22.12.2009, 20:13
Hmmm...
OnPlayerDeath:
OnPlayerSpawn:
EDIT: onplayercommand
OnPlayerdisconnect:
pawn Код:
new Float:x[MAX_PLAYERS], Float:y[MAX_PLAYERS],Float:z[MAX_PLAYERS],bool:dead[MAX_PLAYERS];
pawn Код:
GetPlayerPos(playerid,x[playerid],y[playerid],z[playerid]);
pawn Код:
SetPlayerPos(playerid,x[playerid],y[playerid],z[playerid]);
ApplyAnimation(playerid,"...","...",4.1,1,1,1,1,1); // the animation when the player is dead...
TogglePlayerControllable(playerid,0);
dead[playerid] = true;
pawn Код:
if(strcmp(cmd, "/heal", true) == 0)
{
if(gTeam[playerid] != TEAM_MEDIC) return SendClientMessage(playerid,0xff0000AA,"You cant heal hem");
for(new i;i<MAX_PLAYERS;i++)
{
new Float:x2,Float:y2,Float:z2;
GetPlayerPos(i,x2,y2,z2);
if(IsPlayerInRageOfPoint(playerid,x2,y2,z2))
{
TogglePlayerControllable(playerid,1);
dead[playerid] = false;
ClearAnimations(playerid);
return 1;
}
}
return SendClientMessage(playerid,0xff0000AA,"There is nobody in your area");
}
pawn Код:
dead[playerid] = false;