spawn buttons after death
#1

Hi

How to remove spawn buttons after player death?

TogglePlayerSpectating(playerid, true); not work

THX
Reply
#2

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(playeridclassid)
{
    
SetSpawnInfo(playerid000030000000); // you'll be kicked when you spawn if you dont have this. Set it to wherever you want.
    
TogglePlayerSpectating(playeridtrue);
    
SetTimerEx("loginscreen"1000"i"playerid);
    return 
1;
}
forward loginscreen(playerid);
public 
loginscreen(playerid)
{
    
SetPlayerCameraPos(playeridxyz);
    
SetPlayerCameraLookAt(playeridxyz);
    
    
// Show dialogs etc. here
    
    
clearplayerchat(playerid); // This will send some empty clientmessages
    
return 1;

Reply
#3

Not work, i have a spawn buttons ...
Reply
#4

public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
player_death[playerid] = true;
}
return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)