INVALID_VEHICLE_ID = Unknown Command?
#1

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. ^
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)