Hallo,
Unszwar bei diesen wiederbeleb befehl wenn jetzt jemand gestorben ist & er /wiederbeleben macht belebt er sich irgentwie selber wieder.
Code:
if (strcmp(cmd, "/wiederbeleben", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pTot] == 1 && PlayerToPoint(5.0,playerid,PlayerInfo[i][pTx],PlayerInfo[i][pTy],PlayerInfo[i][pTz]))
{
OnePlayAnim(playerid,"MEDIC","CPR",4.0,0,0,0,0,0);
SendClientMessage(playerid, COLOR_GREEN, "Du fängst jetzt mit der Reanimierung an!");
// new string[99];
new pname[20];
GetPlayerName(playerid, pname, 256);
format(string, 256, "Du hast %s wiederbelebt.",pname);
SendClientMessage(playerid, COLOR_GREEN, string);
GetPlayerName(playerid, pname, 256);
SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
format(string, 256, "Arzt %s hat dich wiederbelebt (100$-)",pname);
SendClientMessage(playerid, COLOR_WHITE, string);
PlayerInfo[playerid][pTot] = 0;
pIstTot[playerid] = 0;
SetPlayerPos(playerid,PlayerInfo[playerid][pTx],PlayerInfo[playerid][pTy],PlayerInfo[playerid][pTz]);
SetCameraBehindPlayer(playerid);
DestroyPickup(TotenKopf[playerid]);
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
SetPlayerVirtualWorld(playerid,0);
TogglePlayerControllable(playerid,1);
GivePlayerMoney(playerid, -100);
GivePlayerMoney(playerid, 100);
PlayerInfo[playerid][pTx] = 0.0;
PlayerInfo[playerid][pTy] = 0.0;
PlayerInfo[playerid][pTz] = 0.0;
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
SetPlayerHealth(playerid,50.0);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Medic!");
}
}
return 1;
}