OnPlayerDeath Problem?
#1

Hi all. I created this for OnPlayerDeath callback

Код:
LaimejoKova(killerid);
And when i kill something I have crash ,kick.

Function stock:

Код:
stock LaimejoKova(playerid)
{
	if(ArDalyvaujaBokse[playerid])
	{
		zInfo[playerid][Atlyginimas]+=200;
		ArDalyvaujaBokse[playerid]=false;
		ArVykstaBoksas=0;
		Atsiradimas=0;
		new msg[88];
		format(msg,88, "[SERVERIS]: {E0E0E0}Baigėsi kova bokso klube laimėtojas %s" ,PlayerName(playerid) );
		SendClientMessageToAll(0xFF80C0FF,msg);
		GameTextForPlayer(playerid,"g~Laimėjote kova~n~~w~Prie atlyginimo prideta ~g~200 Lt", 5000, 5);
		SetPlayerHealth(playerid,100.0);
	}
}
I know I do something wrong ?
Reply
#2

Any answers?
Reply
#3

try
pawn Код:
stock LaimejoKova(playerid)
{
    if(ArDalyvaujaBokse[playerid])
    {
        zInfo[playerid][Atlyginimas]++200;
        ArDalyvaujaBokse[playerid]=0;
        ArVykstaBoksas=0;
        Atsiradimas=0;
        new msg[88];
        format(msg,sizeof(msg),"[SERVERIS]: {E0E0E0}Baigėsi kova bokso klube laimėtojas %s" ,PlayerName(playerid) );
        SendClientMessageToAll(0xFF80C0FF,msg);
        GameTextForPlayer(playerid,"g~Laimėjote kova~n~~w~Prie atlyginimo prideta ~g~200 Lt", 5000, 5);
        SetPlayerHealth(playerid,100.0);
    }
}
Reply
#4

Quote:
Originally Posted by Fires
Посмотреть сообщение
try
pawn Код:
stock LaimejoKova(playerid)
{
    if(ArDalyvaujaBokse[playerid])
    {
        zInfo[playerid][Atlyginimas]++200;
        ArDalyvaujaBokse[playerid]=0;
        ArVykstaBoksas=0;
        Atsiradimas=0;
        new msg[88];
        format(msg,sizeof(msg),"[SERVERIS]: {E0E0E0}Baigėsi kova bokso klube laimėtojas %s" ,PlayerName(playerid) );
        SendClientMessageToAll(0xFF80C0FF,msg);
        GameTextForPlayer(playerid,"g~Laimėjote kova~n~~w~Prie atlyginimo prideta ~g~200 Lt", 5000, 5);
        SetPlayerHealth(playerid,100.0);
    }
}
Wtf? I think you don't understand my script is good. Don't try help me if you don't understand about scripting.
Reply
#5

if your scrpt is ok, what's the problem than? Something is wrong with your script!
Reply
#6

Quote:
Originally Posted by System64
Посмотреть сообщение
if your scrpt is ok, what's the problem than? Something is wrong with your script!
He's changed some things but it not working.
Reply
#7

why don't you add this directly in OnPlayerDeath not use it as stock?

pawn Код:
if(ArDalyvaujaBokse[killerid])
    {
        zInfo[killerid][Atlyginimas]+=200;
        ArDalyvaujaBokse[killerid]=false;
        ArVykstaBoksas=0;
        Atsiradimas=0;
        new msg[88];
        format(msg,88, "[SERVERIS]: {E0E0E0}Baigėsi kova bokso klube laimėtojas %s" ,PlayerName(killerid) );
        SendClientMessageToAll(0xFF80C0FF,msg);
        GameTextForPlayer(killerid,"g~Laimėjote kova~n~~w~Prie atlyginimo prideta ~g~200 Lt", 5000, 5);
        SetPlayerHealth(killerid,100.0);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)