0 razvanduciuc Posted April 17, 2019 Posted April 17, 2019 On 4/14/2019 at 2:06 AM, RiNNesHD said: Am nevoie de cineva in care ma poate ajuta sa fac comanda /fare in care sa imi apara tarifu si cati bani a facut un add pe disc: UEVEN.SSH#1022 Iti copiez o comanda aici, te poti lua dupa aceasta comanda sa iti faci. CMD:fare(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first."); if(PlayerInfo[playerid][pMember] != 13) return SendClientMessage(playerid, COLOR_ERROR, "(Error){FFFFFF} You are not a taxi driver."); new fare,string[128],name[30]; if(sscanf(params, "d", fare)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /fare [amount]"); if(fare < 0 || fare > 125) return SendClientMessage(playerid, COLOR_ERROR, "(Error){FFFFFF} Fare must be between 1 and 125."); if(fare == 0) { TaxiFare[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, "You are now off duty!"); PlayerTextDrawHide(playerid, RentCarText[playerid]); TaxiMoneyEarned[playerid] = 0; foreach(new i : Player) { if(TaxiDriver[i] == playerid) { TaxiDriver[i] = -1; TaxiMoneySpent[i] = 0; TaxiTimer[i] = 0; PlayerTextDrawHide(i, RentCarText[i]); } } } else { if(!IsAnTaxi(GetPlayerVehicleID(playerid))) return 1; GetPlayerName(playerid, name, sizeof(name)); TaxiFare[playerid] = fare; format(string, sizeof(string), "* Taxi driver %s is now on duty ($%d). [/service taxi]", name, fare); SendClientMessageToAll(COLOR_ADV, string); SendClientMessage(playerid, COLOR_ERROR, "(Info){FFFFFF} To get off duty, use /fare 0!"); PlayerTextDrawSetString(playerid, RentCarText[playerid], "~r~waiting for customers.."); PlayerTextDrawShow(playerid, RentCarText[playerid]); foreach(new i : Player) { if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i) && playerid != i) { TaxiDriver[i] = playerid; TaxiMoneySpent[i] += TaxiFare[playerid]; TaxiMoneyEarned[playerid] += TaxiFare[playerid]; GivePlayerCash(i, -TaxiFare[playerid]); GivePlayerCash(playerid, TaxiFare[playerid]); Update(i, pCashx); Update(playerid, pCashx); new timer = 10 + random(7); TaxiTimer[i] = timer; format(string, sizeof(string), "money earned: ~g~$%d", TaxiMoneyEarned[playerid]); PlayerTextDrawSetString(playerid, RentCarText[playerid], string); PlayerTextDrawShow(playerid, RentCarText[playerid]); format(string, sizeof(string), "money spent so far: ~g~$%d", TaxiMoneySpent[i]); PlayerTextDrawSetString(i, RentCarText[i], string); PlayerTextDrawShow(i, RentCarText[i]); } } } return 1; } Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.
Question
Ionut1
------
Edited by Zewyys.1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now