SA-MP Forums Archive
INVALID_VEHICLE_ID = Unknown Command? - 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: INVALID_VEHICLE_ID = Unknown Command? (/showthread.php?tid=378712)



INVALID_VEHICLE_ID = Unknown Command? - Karkand - 19.09.2012

I've recently been working with INVALID_VEHICLE_ID and have discovered it will make your command return unknown.


pawn Код:
CMD:vid(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /vid [vehicle id]");
if(strval(params) == INVALID_VEHICLE_ID) return SendClientMessage(playerid, -1, "Invalid vehicle.");
SendClientMessage(playerid, -1, "Vehicle valid.");
return 1;
}

That is just an example. ^


Re: INVALID_VEHICLE_ID = Unknown Command? - SuperViper - 19.09.2012

The string value of params will never equal INVALID_VEHICLE_ID unless you set it manually or the user actually types /vid 65535 or whatever it is.