if(strcmp(cmd, "/heilen", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] != 7)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Mediziner!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /heilen [playerid]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, playa))
{
if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selbst heilen!"); return 1; }
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du hast %s die Heilung für 500$ angeboten.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Mediziner %s bietet dir eine Heilung für 500$ an, (gib /accept heilung) ein um anzunehmen.",sendername);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht in deiner Nähe.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht online.");
}
}
}
return 1;
}
if(strcmp(cmd,"/accept",true)==0)
{
if(IsPlayerConnected(playerid))
{
new x_job[256];
x_job = strtok(cmdtext, idx);
if(!strlen(x_job)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Akzeptieren __________________|");
SendClientMessage(playerid, COLOR_WHITE, "Benutze: accept [name]");
SendClientMessage(playerid, COLOR_GREY, "Verfügbare Namen: Sex, Drugs, Heilung, Bodyguard, Live, Refill, Wheelmen");
SendClientMessage(playerid, COLOR_GREY, "Verfügbare Namen: Car, Taxi, Bus, Boxing, Medic, Mechanic, Paper, Ticket, kippe");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_job,"heilung",true) == 0)
{
if(CarOffer[playerid] < 999)
{
if(IsPlayerConnected(CarOffer[playerid]))
{
if(GetPlayerMoney(playerid) > HeilPrice[playerid])
{
GetPlayerName(CarOffer[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du hast Medizin für $%d von Mediziner %s gekauft.",HeilPrice[playerid],giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast %s Medizin für $%d verkauft.",sendername,HeilPrice[playerid]);
SendClientMessage(CarOffer[playerid], COLOR_LIGHTBLUE, string);
GivePlayerMoney(playerid, -HeilPrice[playerid]);
PlayerInfo[CarOffer[playerid]][pPayCheck] += HeilPrice[playerid];
GivePlayerMoney(playerid, -HeilPrice[playerid]);
SetPlayerHealth(playerid,100);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du hast nicht genug Geld für die Heilung!");
return 1;
}
}
}
return 1;
}
Der Befehl /heilen klappt Ingame, sobald man /accept heilung macht kommt nichts mehr?