- 0
Comanda /repair
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Jimmi
Problema intalnita (descriere):Vreau sa modific comanda /repair.Cum pot face sa nu mai ceara bani.Adica sa fi in fata unei masini sa dai /repair si sa te bage intr-o animatie.Fara sa mai ceri bani sau sa scri id-ul userului.
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):
if(strcmp(cmd, "/repair", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) { SendClientMessage(playerid, COLOR_GREY, " You are not a Car Mechanic!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /repair [playerid/numejucator] [price]"); return 1; } new playa; new money; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1, or above 99999!"); return 1; } if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa)) { if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, " Can't do that!"); return 1; } GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Te-ai oferit sa ii repari masina lui %s pentru $%d .",giveplayer,money); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Mecanicul auto %s vrea sa iti repare masina pentru $%d, (scrie /accept repair) pentru a accepta.",sendername,money); SendClientMessage(playa, COLOR_LIGHTBLUE, string); RepairOffer[playa] = playerid; RepairPrice[playa] = money; } else { SendClientMessage(playerid, COLOR_GREY, " Acel jucator nu este langa tine / not in a car."); } } } else { SendClientMessage(playerid, COLOR_GREY, " Acel jucator este offline."); } } return 1; }Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da
Edited by jimmi8 answers to this question
Recommended Posts