Posts: 97
Threads: 18
Joined: May 2012
Reputation:
0
Hi
How to remove spawn buttons after player death?
TogglePlayerSpectating(playerid, true); not work
THX
Posts: 617
Threads: 129
Joined: Feb 2014
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;
}
Posts: 97
Threads: 18
Joined: May 2012
Reputation:
0
Not work, i have a spawn buttons ...
Posts: 97
Threads: 18
Joined: May 2012
Reputation:
0
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
player_death[playerid] = true;
}
return true;
}