13.11.2010, 07:14
pawn Код:
forward health(playerid);
public health(playerid)
{
if(GetPlayerHealth(playerid,health) <= 1)
{
new Float:health;
SetPlayerHealth(playerid,1.00);
TogglePlayerControllable(playerid,false);
GameTextForPlayer(playerid,"Type /accept to accept your Death");
}
}
public OnPlayerConnect(playerid,blablabla)
{
SetTimerEx("health",1000,true,"i",playerid);
}
pubic onplayercommandtext(playerid, blablabla)
{
if(strcmp("/accept",cmdtext,true) == 0)
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,0xAA3333AA,"You died because you accepted your death");
SetPlayerPos(YOUR CO _ ORDS);
}
}
return 1;