[HELP] +1 Untill == 10 - 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: [HELP] +1 Untill == 10 (
/showthread.php?tid=188591)
[HELP] +1 Untill == 10 -
Blatnoi - 08.11.2010
i need +1 Untill == 10 code for my fuel command
this is example of what i'm having now
Код:
if(VehicleFuel[GetPlayerVehicleID(playerid)]==10)
{
SendClientMessage(playerid, c_r, "Tank Is Already Full");
}
else
{
VehicleFuel[GetPlayerVehicleID(playerid)]=VehicleFuel[GetPlayerVehicleID(playerid)]+1;
}
this code adds +1 fuel every time i enter /afuel comamnd
i wan't this script to Continue adding +1 to VehicleFull untill it's count gets to 10 without re entering command /afuel
p.s.
and wiki link please on all codes with definitions like"
==
!=
>+
etc..
Re: [HELP] +1 Untill == 10 -
GeorgeBrown - 08.11.2010
Код:
if(VehicleFuel[GetPlayerVehicleID(playerid)]==10)
{
SendClientMessage(playerid, c_r, "Tank Is Already Full");
return 1;
}
Re: [HELP] +1 Untill == 10 -
iggy1 - 08.11.2010
https://sampwiki.blast.hk/wiki/Control_Structures
You will want a "for loop".
Re: [HELP] +1 Untill == 10 -
Gamer_Z - 08.11.2010
pawn Код:
if(VehicleFuel[GetPlayerVehicleID(playerid)]==10)
{
SendClientMessage(playerid, c_r, "Tank Is Already Full");
}
else
{
for(new i; i < 12; i++){
if(VehicleFuel[GetPlayerVehicleID(playerid)]>=10)break;
VehicleFuel[GetPlayerVehicleID(playerid)]+=1;
}
}
Re: [HELP] +1 Untill == 10 -
Blatnoi - 08.11.2010
Quote:
Originally Posted by iggy1
|
Thanx for the link it helped me to solve my other problem
Quote:
Originally Posted by gamer_Z
|
thank you very very very much it works
i was already having a headeach