Hay Ho Scripter und Community.
Ich habe ein Problem und zwar sobald /repair eintippe kommt einfach nichts.
Was habe ch falsch gemacht?
Hier der Code:
if(strcmp(cmd, "/repair", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(JobDuty[playerid] == 1)
{
if(PlayerInfo[playerid][pLeader] == 18 || PlayerInfo[playerid][pMember] == 18)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Benutze: /repair [SpielerID] [Preis]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(money < 1 || money > 2000) { SendClientMessage(playerid, COLOR_GREY, "Repairpreis kann max. $2000 betragen!"); return 1; }
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du bietest %s an sein Auto für $%d zu reparieren.",giveplayer,money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Mechaniker %s bietet dir an dein Auto für $%d zu reparieren, (Benutze /accept repair) zum akzteptieren.",sendername,money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
RepairOffer[playa] = playerid;
RepairPrice[playa] = money;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Spieler nicht in deiner Nähe.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist offline.");
}
}
}
return 1;
}
}
Danke im Vorraus
MFG