Hey
könnt ihr mir mal helfen?
steht alles dabei
//der geht nicht für Fraktionsid 4 also medics rest geht!
if(strcmp(cmd, "/heal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
new location = PlayerInfo[playerid][pLocal];
if(!strlen(tmp))
{
if(location != 25555)
{
if(location < 25554)
{
if(HouseInfo[location][hArm] == 1 && IsACop(playerid))
{
format(string, sizeof(string), "* %s puts on body armour.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TogglePlayerControllable(playerid, 0);
GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
SetPlayerPos(playerid,1527.5,-12.1,1002.0);
PlayerInfo[playerid][pLocal] = 25555;
SetPlayerInterior(playerid,99);
Spectate[playerid] = 257;
}
else
{
format(string, sizeof(string), "This place does not have armour upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
if(HouseInfo[location][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if ( tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been healed to 100 health.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
}
}
else
{
format(string, sizeof(string), "This place does not have healing upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
return 1;
}
else if(location == 101)//Restaurant
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if ( tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Nun hast du 100 Leben.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
SendClientMessage(playerid, TEAM_GREEN_COLOR,"Du hast schon 100 Leben.");
}
}
else if(location == 102 && IsACop(playerid))//Police Armoury
{
SetPlayerHealth(playerid,100.0);
format(string, sizeof(string), "* %s puts on body armour.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TogglePlayerControllable(playerid, 0);
GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
SetPlayerPos(playerid,1527.5,-12.1,1002.0);
PlayerInfo[playerid][pLocal] = 25555;
SetPlayerInterior(playerid,99);
Spectate[playerid] = 257;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /heal [playerid/PartOfName] [Kosten für den anderen]");
return 1;
}
}
else
{
if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
{
if(JobDuty[playerid] == 1)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /heal [playerid/PartOfName] [price]");
return 1;
}
new playa;
new money;
tmp = strtok(cmdtext, idx);
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(money >= 1 || money <= 100)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
{
if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, " Du kannst dich nicht selber Heilen!"); return 1; }
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du bittest %s eine Artztliche Behandlung für $%d .",giveplayer,money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Artzt %s bittet dir eine Artztliche Behandlung für $%d, (type /accept heal) zum aktzeptieren.",sendername,money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
HealOffer[playa] = playerid;
HealMoney[playa] = money;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht in deiner Nähe .");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist offline.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Preis von 1 - 100!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Artzt!");
return 1;
}
}
}
}
return 1;
}
//das ist in einen Timer der 500ms entweder bekommt der user eine exe oder das auto explodiert trotzdem
if(rettung[playerid] == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(!NoCar(vehicleid))
{
if(Feuerwehrmannon())
{
new Float:vh;
//new string[128];
new giveplayer[128];
GetVehicleHealth(vehicleid,vh);
if(vh > 1 && vh < 350)
{
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
rettung[playerid] = 1;
new string[128];
TogglePlayerControllable(playerid, 0);
SetPlayerHealth(playerid,20);
SetVehicleHealth(vehicleid,250);
SendClientMessage(playerid,COLOR_YELLOW,"Sie haben einen Unfall verursacht die Feuerwehr ist schon auf dem Weg!");
format(string, sizeof(string), "%s hat ein Unfall schau auf den Marker!",giveplayer);
for(new o = 0;o<MAX_PLAYERS;o++)
{
if(IsPlayerConnected(o))
{
if(PlayerInfo[o][pLeader] == 4 || PlayerInfo[o][pMember] == 4)
{
if(JobDuty[o] > 0)
{
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
SetPlayerCheckpoint(o, pX, pY, pZ, 3);
}
}
}
}
}
}
}
}
}
mfg
Ps: habe noch 2 Fails pls einer posten