Quote:
Originally Posted by angelxeneize
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 522)
|
While that would fix the issue you're not helping him at all explaining where the mistake is:
Your error happens because vehicleid was not defined (
duh) before using it, something like this could have happened:
pawn Код:
if(GetVehicleModel(vehicleid) == 400)
{
new vehicleid = GetPlayerVehicleID(playerid);
//code
}
The compiler and the whole scripting structure is an ordered sequence of events (in most of the cases), that means it will be read in order from top to bottom when executing.
If that's not the case then you forgot to create the variable vehicleid to store the vehicle ID on.