Wieso funktioniert hier nix ?
ocmd:wiederbeleben(playerid,params[])
{
if(isPlayerInFrakt(playerid,3))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
{
if(isPlayerInFrakt(playerid,3))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPVarInt(i,"Friedhof")==1 &&
IsPlayerInRangeOfPoint(i,3.0,GetPVarInt(i,"tx"),GetPVarInt(i,"ty"),GetPVarInt(i,"tz")))
{
new string[128];
new pname[256];
GetPlayerName(i, pname, 256);
format(string, 256, "Du hast %s, wiederbelebt!",pname);
SendClientMessage(playerid, BLAU, string);
GetPlayerName(playerid, pname, 256);
format(string, 256, "Arzt %s hat dich wiederbelebt!",pname);
SendClientMessage(i, BLAU, string);
DestroyPickup(TotenKopf[i]);
SetPVarInt(i,"Friedhof",0);
SetPlayerPos(i,GetPVarInt(i,"tx"),GetPVarInt(i,"ty"),GetPVarInt(i,"tz"));
SetCameraBehindPlayer(i);
SetPVarInt(i,"tx",0.0);
SetPVarInt(i,"ty",0.0);
SetPVarInt(i,"tz",0.0);
new Float:tempheal;
GetPlayerHealth(i,tempheal);
SetPlayerHealth(i,15.0);
return 1;
}
}
}
return 1;
}
IsPlayerInRangeOfPoint(i,3.0,GetPVarInt(i,"tx"),GetPVarInt(i,"ty"),GetPVarInt(i,"tz")))
{
new string[128];
new pname[256];
GetPlayerName(i, pname, 256);
format(string, 256, "Du hast %s, wiederbelebt!",pname);
SendClientMessage(playerid, BLAU, string);
GetPlayerName(playerid, pname, 256);
format(string, 256, "Arzt %s hat dich wiederbelebt!",pname);
SendClientMessage(i, BLAU, string);
DestroyPickup(TotenKopf[i]);
SetPVarInt(i,"Friedhof",0);
SetPlayerPos(i,GetPVarInt(i,"tx"),GetPVarInt(i,"ty"),GetPVarInt(i,"tz"));
SetCameraBehindPlayer(i);
SetPVarInt(i,"tx",0.0);
SetPVarInt(i,"ty",0.0);
SetPVarInt(i,"tz",0.0);
new Float:tempheal;
GetPlayerHealth(i,tempheal);
SetPlayerHealth(i,15.0);
return 1;
}
}
}
return 1;
}
//edit brauche immer noch hilfe :$