22.12.2009, 20:05
Aye i want to ask a question is there possible to do that when someone got killed they dead body stays until medic picks them up or any person [In RP] and than find out how he got killed?
new Float:x[MAX_PLAYERS], Float:y[MAX_PLAYERS],Float:z[MAX_PLAYERS],bool:dead[MAX_PLAYERS];
GetPlayerPos(playerid,x[playerid],y[playerid],z[playerid]);
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;
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");
}
dead[playerid] = false;