SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/11/2018, 09:37 PM   #1
Longover
Big Clucker
 
Join Date: Oct 2017
Location: Romania
Posts: 138
Reputation: 0
Default OnActorDeath

Hi!

When i put this public,i get the null error.
No error messages,no crash,no text in the compilier box,nothing,just white,and the amx file is 0kb.

Code:
public OnActorDeath(actorid, killerid, reason);
{
    if(actorid == NPCTerorist[0])
	{
	    if(kteroristi[killerid] != 2)
	    {
	        kteroristi[killerid]++;
	        return 1;
	    }
	    else
	    {
	        new msk[182], totalmisiune = 5000 + random(10000);
	        format(msk, 148, "Ai primit %s$ pentru rezolvarea acestei misiuni! Felicitari!", FormatNumber(totalmisiune));
			SendClientMessage(killerid, COLOR_GREEN, msk);
			giveMoney(killerid, totalmisiune);
			giveXP(killerid, 15);
			giveScore(killerid, 3);
			DestroyActor(NPCTerorist[1]);
			DestroyActor(NPCTerorist[0]);
			KillTimer(terotimer[playerid]);
			MissionStep[1][killerid] = 0;
			KillTimer(drugedtimer[playerid]);
			MissionTaken[1] = false;
			kteroristi[killerid] = 0;
			MissionOnPlayer[1][killerid] = false;
			mission = false;
			foreach(new i : Player)
					{
						if (isLEO(i))
						{
							new radio[100];
							format(radio, sizeof(radio), "%s a terminat misiunea 'Alah akbar!' si a primit %s$ !", GetName(killerid), FormatNumber(totalmisiune));
							SendClientMessage(i, COLOR_PURPLE, radio);
						}
     				}
            return 1;
	    }
	}
	if(actorid == NPCTerorist[1])
	{
	    if(kteroristi[killerid] != 2)
	    {
	        kteroristi[killerid]++;
	        return 1;
	    }
	    else
	    {
	        new msk[182], totalmisiune = 5000 + random(10000);
	        format(msk, 148, "Ai primit %s$ pentru rezolvarea acestei misiuni! Felicitari!", FormatNumber(totalmisiune));
			SendClientMessage(killerid, COLOR_GREEN, msk);
			giveMoney(killerid, totalmisiune);
			giveXP(killerid, 15);
			giveScore(killerid, 3);
			DestroyActor(NPCTerorist[1]);
			DestroyActor(NPCTerorist[0]);
			MissionStep[1][killerid] = 0;
			MissionTaken[1] = false;
			KillTimer(terotimer[playerid]);
			kteroristi[killerid] = 0;
			MissionOnPlayer[1][killerid] = false;
			mission = false;
			foreach(new i : Player)
					{
						if (isLEO(i))
						{
							new radio[100];
							format(radio, sizeof(radio), "%s a terminat misiunea 'Alah akbar!' si a primit %s$ !", GetName(killerid), FormatNumber(totalmisiune));
							SendClientMessage(i, COLOR_PURPLE, radio);
						}
     				}
            return 1;
	    }
	}
	return 1;
}
__________________
Keep calm and join on my server.
ROMANIA!!!

Longover is offline   Reply With Quote
Old 10/11/2018, 09:43 PM   #2
Longover
Big Clucker
 
Join Date: Oct 2017
Location: Romania
Posts: 138
Reputation: 0
Default Re: OnActorDeath

Quote:
Originally Posted by Longover View Post
Hi!

When i put this public,i get the null error.
No error messages,no crash,no text in the compilier box,nothing,just white,and the amx file is 0kb.

Code:
public OnActorDeath(actorid, killerid, reason);
{
    if(actorid == NPCTerorist[0])
	{
	    if(kteroristi[killerid] != 2)
	    {
	        kteroristi[killerid]++;
	        return 1;
	    }
	    else
	    {
	        new msk[182], totalmisiune = 5000 + random(10000);
	        format(msk, 148, "Ai primit %s$ pentru rezolvarea acestei misiuni! Felicitari!", FormatNumber(totalmisiune));
			SendClientMessage(killerid, COLOR_GREEN, msk);
			giveMoney(killerid, totalmisiune);
			giveXP(killerid, 15);
			giveScore(killerid, 3);
			DestroyActor(NPCTerorist[1]);
			DestroyActor(NPCTerorist[0]);
			KillTimer(terotimer[playerid]);
			MissionStep[1][killerid] = 0;
			KillTimer(drugedtimer[playerid]);
			MissionTaken[1] = false;
			kteroristi[killerid] = 0;
			MissionOnPlayer[1][killerid] = false;
			mission = false;
			foreach(new i : Player)
					{
						if (isLEO(i))
						{
							new radio[100];
							format(radio, sizeof(radio), "%s a terminat misiunea 'Alah akbar!' si a primit %s$ !", GetName(killerid), FormatNumber(totalmisiune));
							SendClientMessage(i, COLOR_PURPLE, radio);
						}
     				}
            return 1;
	    }
	}
	if(actorid == NPCTerorist[1])
	{
	    if(kteroristi[killerid] != 2)
	    {
	        kteroristi[killerid]++;
	        return 1;
	    }
	    else
	    {
	        new msk[182], totalmisiune = 5000 + random(10000);
	        format(msk, 148, "Ai primit %s$ pentru rezolvarea acestei misiuni! Felicitari!", FormatNumber(totalmisiune));
			SendClientMessage(killerid, COLOR_GREEN, msk);
			giveMoney(killerid, totalmisiune);
			giveXP(killerid, 15);
			giveScore(killerid, 3);
			DestroyActor(NPCTerorist[1]);
			DestroyActor(NPCTerorist[0]);
			MissionStep[1][killerid] = 0;
			MissionTaken[1] = false;
			KillTimer(terotimer[playerid]);
			kteroristi[killerid] = 0;
			MissionOnPlayer[1][killerid] = false;
			mission = false;
			foreach(new i : Player)
					{
						if (isLEO(i))
						{
							new radio[100];
							format(radio, sizeof(radio), "%s a terminat misiunea 'Alah akbar!' si a primit %s$ !", GetName(killerid), FormatNumber(totalmisiune));
							SendClientMessage(i, COLOR_PURPLE, radio);
						}
     				}
            return 1;
	    }
	}
	return 1;
}
LOL! i have OnActorDeath(actorid, killerid, reason);
( ; )
__________________
Keep calm and join on my server.
ROMANIA!!!

Longover is offline   Reply With Quote
Old 10/11/2018, 11:29 PM   #3
TheToretto
Huge Clucker
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 261
Reputation: 22
Default Re: OnActorDeath

omegalul
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 06:41 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.