#1

How can i create that i with this command /fill have to /fill [amount]


command:


if(strcmp(cmd, "/fill", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsAtGasStation(playerid))
{
GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~ n~~n~~n~Punenje vozila, molim pricekajte",2000,3);
SetTimer("Fillup",RefuelWait,0);
Refueling[playerid] = 0;
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Niste na benzinskoj stanici!");
}
}
return 1;
}


sorry for my bad english
Reply
#2

Show us the "FillUp" Function.
Reply
#3

here is


public Fillup()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new VID;
new FillUp;
new string[128];
VID = GetPlayerVehicleID(i);
FillUp = GasMax - Gas[VID];
if(Refueling[i] == 1)
{
if(GetPlayerMoney(i) >= FillUp+4)
{
Gas[VID] += FillUp;
FillUp = FillUp * SBizzInfo[3][sbEntranceCost];
format(string,sizeof(string),"Vozilo napunjeno gorivom, za: $%d.",FillUp);
SendClientMessage(i,COLOR_PLAVA,string);
GivePlayerMoney(i, - FillUp);
SBizzInfo[3][sbTill] += FillUp;
ExtortionSBiz(3, FillUp);
Refueling[i] = 0;
}
else
{
format(string,sizeof(string),"* Nemate dovoljno novaca za tenkiranje, kosta $%d da napunite vase vozilo.",FillUp);
SendClientMessage(i,COLOR_PLAVA,string);
}
}
}
}
return 1;
}
Reply
#4

hhh...refresh...help me
Reply
#5

again refreshhhhhhhhh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)