30.09.2012, 11:37
COMMAND:die(playerid, params[])
{
if(pInfo[playerid][pDie] == 0)
{
SetPlayerHealth(playerid, 0);
pInfo[playerid][pDie] = 1;
return 1;
}
if(pInfo[playerid][pDie] == 1)
SendClientMessage(playerid, 0xDEEE20FF, "You have already died one time");
return 1;
}
and somewhere on top of your gm add:
enum
e_PlayerInfo
{
pDie
};
new pInfo[MAX_PLAYERS][e_PlayerInfo];
{
if(pInfo[playerid][pDie] == 0)
{
SetPlayerHealth(playerid, 0);
pInfo[playerid][pDie] = 1;
return 1;
}
if(pInfo[playerid][pDie] == 1)
SendClientMessage(playerid, 0xDEEE20FF, "You have already died one time");
return 1;
}
and somewhere on top of your gm add:
enum
e_PlayerInfo
{
pDie
};
new pInfo[MAX_PLAYERS][e_PlayerInfo];