- 0
Comanda /refill
-
Similar Content
-
- 2 replies
- 2.026 views
-
- 1 answer
- 468 views
-
- 2 answers
- 1.060 views
-
Am o problema cu un battlepass,de ce nu merge comanda /misiuni cand o scriu,tin sa precizez ca script-ul mi l-a facut chatgpt
By cbnmihaita,
- 2 answers
- 879 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.

Question
Marius_Smith
Problema intalnita (descriere): Am incercat sa schimb comanda refill, sa aiba acces cei din factiunea TCC la ea, si nu cei din jobul Mechanic, dar cand intru pe server, fiind in factiune, cand scriu comanda, imi zice ca nu sunt Membru TCC.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul:
//-----------------------------------------Comanda-----------------------------------------// if(strcmp(cmd, "/refill", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerData[playerid][pMember] == 10 || PlayerData[playerid][pLeader] == 10) { SendClientMessage(playerid, COLOR_GREY, "Nu esti membru TCC!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendUsage(playerid,"/refill [playerid/PartOfName] [pret]"); return 1; } new playa; new money; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if(money < 1 || money > 1000) { SendClientMessage(playerid, COLOR_GREY, "Pretul trebuie sa fie cuprins intre $1 si $1000!"); 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, "Nu poti sa iti bagi benzina tie insuti!"); return 1; } GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* I-ai oferit la %s sa-i bagi benzina pentru $%d .",giveplayer,money); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Mecanicul %s vrea sa iti bage benzina pentru $%d, (scrie /accept refill pentru a accepta).",sendername,money); SendClientMessage(playa, COLOR_LIGHTBLUE, string); RefillOffer[playa] = playerid; RefillPrice[playa] = money; } else { SendClientMessage(playerid, COLOR_GREY, "Acest jucator nu este langa tine sau intr-o masina."); } } } else { SendClientMessage(playerid, COLOR_GREY, "Acest jucator nu este conectat."); } } return 1; }Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da, dar nu reusesc.
5 answers to this question
Recommended Posts