Hallo, Ich habe eine Frage, Und Zwar, wie kann ich es machen, damit der Medic, 100$+ bekommt wen er einen Revivt(wiederbelebt), und das von dem Toten 100$- gehen.
if (strcmp(cmd, "/wiederbeleben", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22)
{
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]))
{
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;
SetPlayerPos(i,PlayerInfo[i][pTx],PlayerInfo[i][pTy],PlayerInfo[i][pTz]);
SetCameraBehindPlayer(i);
DestroyPickup(TotenKopf[i]);
SetPlayerSkin(i, PlayerInfo[i][pChar]);
SetPlayerVirtualWorld(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;
}
Mit freundlichen Grüßen,
Crazykiller.