[!]Sloved - 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: [!]Sloved (
/showthread.php?tid=82772)
[!]Sloved -
-Davee- - 20.06.2009
-
Re: [!]Please help with Fix Exploit Bug -
CracK - 20.06.2009
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 589 || 492 || 516 || 404 || 547 || 489 || 505 || 405 || 421)
You can't write this way.
You should type:
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 589 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 492 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 516 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 404 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 547 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 489 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 505 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 405 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 421)
It looks very unefficient, so to optimize it, make
pawn Код:
new model = GetVehicleModel(vehicleid);
and then replace yours with:
pawn Код:
switch(model)
{
case 589,492,516,404,547,489,505,405,421: return 1;
}
I'm looking forward for your finished work.
Re: [!]Please help with Fix Exploit Bug -
-Davee- - 20.06.2009
Ok. Thanks