SA-MP Forums Archive
Problem with respawn - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with respawn (/showthread.php?tid=101817)



Problem with respawn - linoxtrala - 12.10.2009

Hello, I Have a problem with the respawn of the saints, to the respawn when you initiate the game it(he,she) is OK but when you die the game is closed, since(as,like) podria to arrange it?


note: sorry for my bad english =)


Re: Problem with respawn - Correlli - 12.10.2009

Quote:
Originally Posted by linoxtrala
but when you die the game is closed
If i understood you correctly, your server is crashing when someone dies? If yes, post your OnPlayerDeath-callback code.


Re: Problem with respawn - linoxtrala - 12.10.2009

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by linoxtrala
but when you die the game is closed
If i understood you correctly, your server is crashing when someone dies? If yes, post your OnPlayerDeath-callback code.
Thank you, jajaj i am a stupid indeed one forget to change the onplayerdeath and because of it the game is closed. Thank you


Re: Problem with respawn - Correlli - 12.10.2009

So, it's working now?


Re: Problem with respawn - MenaceX^ - 12.10.2009

He wouldn't say thank you if it didn't...


Re: Problem with respawn - linoxtrala - 12.10.2009

Quote:
Originally Posted by Don Correlli
So, it's working now?
yes but my server work with hamachi for my friends =)


Re: Problem with respawn - Correlli - 12.10.2009

Quote:
Originally Posted by MenaceX^
He wouldn't say thank you if it didn't...
I didn't understood him correctly, that's why i asked..


Re: Problem with respawn - linoxtrala - 12.10.2009

I am still equal change a few things but it(he,she) is still equal, is closed whenever it(he,she) wants, aleatoriamente


Re: Problem with respawn - linoxtrala - 12.10.2009

here post the code OnPlayer Death

public OnPlayerDeath(playerid, killerid, reason)
{
new playercash;
if(killerid == INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason );
ResetPlayerMoney(playerid);
} else {
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
playercash = GetPlayerMoney(playerid);
if (playercash > 0) {
GivePlayerMoney(killerid, playercash);
ResetPlayerMoney(playerid);
}
else
{
}
}
return 1;
}


Re: Problem with respawn - linoxtrala - 15.10.2009

Please help my