Guten Tag Community,
ich bin momentan beim wiederbelebn befehl nicht weiter gekommen.Ich stehe vor einem totenkopf und mache /wiederbeleben aber nix funktioniert
hier mein Befehl:
if(strcmp(cmd, "/wiederbeleben", true) == 0 || strcmp(cmd, "/rea", true) == 0 || strcmp(cmd, "/reanimieren", true) == 0)
{
if(IsPlayerConnected(playerid))
{//cmd erstellt von InternetInk
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pTot] == 1 && IsPlayerInRangeOfPoint(playerid,5.0,PlayerInfo[i][pTx],PlayerInfo[i][pTy],PlayerInfo[i][pTz]))
{
new pname[256];
GetPlayerName(i, pname, 256);
format(string, 256, "Du hast %s, wiederbelebt!",pname);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
GetPlayerName(playerid, pname, 256);
format(string, 256, "Arzt %s hat dich wiederbelebt!",pname);
SendClientMessage(i, COLOR_LIGHTGREEN, string);
PlayerInfo[i][pTot] = 0;
pIstTot[i] = 0;// <3 den cmd
SetPlayerInterior(i,GetPlayerInterior(playerid));
SetPlayerPos(i,PlayerInfo[i][pTx],PlayerInfo[i][pTy],PlayerInfo[i][pTz]);
SetCameraBehindPlayer(i);
DestroyPickup(TotenKopf[i][0]);
TogglePlayerControllable(i,1);
PlayerInfo[i][pTx] = 0.0;
PlayerInfo[i][pTy] = 0.0;
PlayerInfo[i][pTz] = 0.0;
new Float:tempheal;
GetPlayerHealth(i,tempheal);
SetPlayerHealth(i,15.0);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du bist kein Arzt!");
}
}
return 1;
}
und beim sterben
GetPlayerPos(playerid,PlayerInfo[playerid][pTx],PlayerInfo[playerid][pTy],PlayerInfo[playerid][pTz]);
CreatePickup(1254,1,PlayerInfo[playerid][pTx],PlayerInfo[playerid][pTy],PlayerInfo[playerid][pTz]);