>> :..[ HELP ]...: << About stock - 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 ]...: << About stock (
/showthread.php?tid=154009)
>> :..[ HELP ]...: << About stock -
DarkPower - 11.06.2010
pawn Код:
stock IsInVehicleForJob(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == 1 || vehicleid == 2 || vehicleid == 3 || vehicleid == 4 || vehicleid == 5 || vehicleid == 6 || vehicleid == 7 || vehicleid == 8 || vehicleid == 9
|| vehicleid == 10 || vehicleid == 11 || vehicleid == 12 || vehicleid == 13 || vehicleid == 14 || vehicleid == 15 || vehicleid == 16 || vehicleid == 17 || vehicleid == 18
|| vehicleid == 19 || vehicleid == 20 || vehicleid == 21 || vehicleid == 22|| vehicleid == 23 || vehicleid == 24 || vehicleid == 25 || vehicleid == 26 || vehicleid == 27)
}
and i get this errors
C:\Users\NASTIE\Desktop\samp03asvr_R7_win32\gamemo des\Untitled.pwn(365) : error 029: invalid expression, assumed zero
C:\Users\NASTIE\Desktop\samp03asvr_R7_win32\gamemo des\Untitled.pwn(365 -- 366) : warning 215: expression has no effect
C:\Users\NASTIE\Desktop\samp03asvr_R7_win32\gamemo des\Untitled.pwn(366) : error 001: expected token: ";", but found "-end of file-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: >> :..[ HELP ]...: << About stock -
¤Adas¤ - 11.06.2010
You have forgotten return 1;
Re: >> :..[ HELP ]...: << About stock -
RyDeR` - 11.06.2010
lol man, such a long code..
You could do:
pawn Код:
stock IsInVehicleForJob(playerid)
{
switch(GetPlayerVehicleID(playerid))
{
case 1..27: return 1;
}
return INVALID_VEHICLE_ID;
}
Re: >> :..[ HELP ]...: << About stock -
Jefff - 11.06.2010
Or
pawn Код:
stock IsInVehicleForJob(playerid)
{
new ID = GetPlayerVehicleID(playerid);
return (ID > 0 && ID < 28) ? 1 : 0;
}
or
pawn Код:
stock IsInVehicleForJob(vid) return (vid > 0 && vid < 28) ? 1 : 0;
Re: >> :..[ HELP ]...: << About stock -
DarkPower - 11.06.2010
thanks