/fuelcars not working ? - 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)
+--- Thread: /fuelcars not working ? (
/showthread.php?tid=440162)
/fuelcars not working ? -
jadhanna2 - 28.05.2013
When you want to fill one car it works fine, but when fueling all it doesnt work
pawn Код:
if(strcmp(cmd, "/fill", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsAtGasStation(playerid))
{
GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Re-Fueling Vehicle, please wait",2000,3);
SetTimer("Fillup",5000,0);
Refueling[playerid] = 1;
}
else
{
SendClientMessage(playerid,COLOR_GREY," You are not at a Gas Station !");
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/fuelcars", true) == 0 && PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(playerid))
{
for(new v = 0; v < MAX_PLAYERS; v++)
{
Refueling[v] = 1;
format(string, sizeof(string), "AdmWarning: %s has refueled all vehicles",PlayerName(playerid));
ABroadCast(COLOR_YELLOW,string,1);
return 1;
}
}
return 1;
}
Re: /fuelcars not working ? -
AIped - 28.05.2013
try MAX_VEHICLES instead of MAX_PLAYERS
Re: /fuelcars not working ? -
dannyk0ed - 28.05.2013
Do you have a Fuel System like
because your thing is setting all cars to refueling, or something.
Re: /fuelcars not working ? -
Noliax8 - 28.05.2013
Why MAX_PLAYER ?
Re : /fuelcars not working ? -
jadhanna2 - 28.05.2013
in /fill i saw Refueling[playerid]
so in /fuelcars i made Refueling all players id
Re : /fuelcars not working ? -
Stefano.R - 28.05.2013
No you have to put the variable that is in "Fillup" and add it in the command instead of Refueling[v] = 1;
Re: /fuelcars not working ? -
xXShadowXx - 28.05.2013
show public Fillup().