spawn buttons after death - 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: spawn buttons after death (
/showthread.php?tid=643121)
spawn buttons after death -
Chipardeur - 13.10.2017
Hi
How to remove spawn buttons after player death?
TogglePlayerSpectating(playerid, true); not work
THX
Re: spawn buttons after death -
1fret - 14.10.2017
Show us the onplayerdeath callback, we need to see codes... Anyways i will just give you a example and you can edit to your likings
PHP код:
#define clearplayerchat(%0) for(new i=0; i<20; i++) SendClientMessage(%0, -1, " ")
public OnPlayerRequestClass(playerid, classid)
{
SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0); // you'll be kicked when you spawn if you dont have this. Set it to wherever you want.
TogglePlayerSpectating(playerid, true);
SetTimerEx("loginscreen", 100, 0, "i", playerid);
return 1;
}
forward loginscreen(playerid);
public loginscreen(playerid)
{
SetPlayerCameraPos(playerid, x, y, z);
SetPlayerCameraLookAt(playerid, x, y, z);
// Show dialogs etc. here
clearplayerchat(playerid); // This will send some empty clientmessages
return 1;
}
Re: spawn buttons after death -
Chipardeur - 14.10.2017
Not work, i have a spawn buttons ...
Re: spawn buttons after death -
Chipardeur - 14.10.2017
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
player_death[playerid] = true;
}
return true;
}