Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:fillgascan(playerid, params[]) {
- if(GetGasStationID(playerid) == -1) return SendClientMessage(playerid,COLOR_GREY,"* Nu esti la o benzinarie.");
- if(PlayerInfo[playerid][pFuel] != 0) return 1;
- if(PlayerInfo[playerid][pGasCan] == 0) return SCM(playerid, -1, "Nu ai o canistra.");
- new price = 20 * 50, string[64];
- format(string, sizeof(string), "* Ai incarcat canistra cu 20%%. Pret: $%s.",FormatNumber(price));
- SendClientMessage(playerid, COLOR_MONEY, string);
- PlayerInfo[playerid][pFuel] = 20;
- BizzInfo[GetGasStationID(playerid)][bBalance] += price;
- GivePlayerCash(playerid, - price);
- new str[178];
- format(str,sizeof(str),"UPDATE users SET `Money`='%d',`Fuel`='20' WHERE `ID`='%d'",GetPlayerCash(playerid),PlayerInfo[playerid][pSQLID]);
- mysql_query(SQL,str);
- format(str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='%d'",BizzInfo[GetGasStationID(playerid)][bBalance],GetGasStationID(playerid));
- mysql_query(SQL,str);
- return 1; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement