09.11.2015, 00:49
Create a new variable, under your player data enum.
Such as: pInfo[playerid][CarID] - so CarID,
Then link it to the vehicle ID as soon as their vehicle spawns.
Then on top of your motor command, input: if(vehicleid != pInfo[playerid][CarID]) return SendClientMessage(playerid, color, message);
Replace the above with your own code.
For factions, do the same, except detect if it's first a faction vehicle, and then create a car faction variable, and have faction car set to the faction's ID.
Such as: pInfo[playerid][CarID] - so CarID,
Then link it to the vehicle ID as soon as their vehicle spawns.
Then on top of your motor command, input: if(vehicleid != pInfo[playerid][CarID]) return SendClientMessage(playerid, color, message);
Replace the above with your own code.
For factions, do the same, except detect if it's first a faction vehicle, and then create a car faction variable, and have faction car set to the faction's ID.