SA-MP Forums Archive
Fuel - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Fuel (/showthread.php?tid=231983)



Fuel - Dino Bloomer - 26.02.2011

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


Re: Fuel - Hash [NL-RP] - 26.02.2011

Show us the "FillUp" Function.


Re: Fuel - Dino Bloomer - 26.02.2011

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;
}


Re: Fuel - Dino Bloomer - 27.02.2011

hhh...refresh...help me


Re: Fuel - Dino Bloomer - 28.02.2011

again refreshhhhhhhhh