OnActorDeath
#1

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.

Код:
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;
}
Reply
#2

Quote:
Originally Posted by Longover
Посмотреть сообщение
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.

Код:
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);
( ; )
Reply
#3

omegalul
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)