Quote:
Originally Posted by Vrondakis
You do it in the same way. If you want all the "workers" to be allowed to get in the hydra + tank + truck, you do the exact same thing.
pawn Code:
new workers[MAX_PLAYERS][playerid] = // The list of skin ids that are allowed. { 27, 38, 29, 213, 219, 6 };
new vehicles[MAX_PLAYERS][playerid] = // The list of vehicles that the workers are allowed to get into. { 520, 528, 532, };
if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER ) { //If they got into a car from being on foot. if( GetVehicleModel(GetPlayerVehicleID( playerid )) == vehicles) //naudoti || masina || { if( GetPlayerSkin(playerid) != workers) //naudoti || skinas ||
{ //If their skin is not 27 //Remove them and send message. RemovePlayerFromVehicle( playerid ); SendClientMessage( playerid,0xFF000000, "Noredami vairuoti si transporta turite buti elektriku" );//-1 return 1; } else { SendClientMessage(playerid, 0xFF000000, "Atsisedote i transporta. Jeigu dirbate, tada dirbkite savo darba"); return 1; } } } return 1; }
Should work, not tested
|
Big error. Can you give a full function?
Look just do a hydra,rhino,rustler,dodo for a soldier skin, and make a car with ID 428 only available for skin 27, same with soldier. And teach me better how to add vehicles and skins for other works like trucker, medic and etc...