OnPlayerDeath Problem? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerDeath Problem? (
/showthread.php?tid=318260)
OnPlayerDeath Problem? -
Montis. - 14.02.2012
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 ?
Re: OnPlayerDeath Problem? -
Montis. - 14.02.2012
Any answers?
Re: OnPlayerDeath Problem? -
Fires - 14.02.2012
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);
}
}
Re: OnPlayerDeath Problem? -
Montis. - 14.02.2012
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.
Re: OnPlayerDeath Problem? -
System64 - 14.02.2012
if your scrpt is ok, what's the problem than? Something is wrong with your script!
Re: OnPlayerDeath Problem? -
Montis. - 14.02.2012
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.
Re: OnPlayerDeath Problem? -
System64 - 14.02.2012
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);
}