skin problem
#2

This should help you, I've made it so no player can enter as driver or passenger, if you want to change that just remove the "|| newstate == PLAYER_STATE_PASSENGER" part.

pawn Код:
new plvehid;
    plvehid = GetVehicleModel(GetPlayerVehicleID(playerid));
    new skin = GetPlayerSkin(playerid);
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        if(plvehid == 597)
        {
            if( (skin == 287) || (skin == 163) || (skin == 282) || (skin == 255) || (skin == 165))
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "== You can use this vehicle to do your job.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "== You are not a cop.");
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
Place it under public OnPlayerStateChange(playerid,newstate,oldstate)

If you place it under OnPlayerEnterVehicle it will only be called when the player pressed ENTER, at that time they aren't yet in the vehicle, so they can't be ejected from it.

Reply


Messages In This Thread
skin problem - by CJ101 - 05.03.2009, 06:38
Re: skin problem - by Outbreak - 05.03.2009, 09:09

Forum Jump:


Users browsing this thread: 2 Guest(s)