Link skin to a vehicle
#2

On the vehicle you want to link the skin to you must get the id. eg
pawn Код:
new mycar;

mycar = AddStaticVehicle(bla);
after that
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new veh = GetPlayerVehicleID(playerid);
        new pskin=GetPlayerSkin(playerid);
        if(pskin != 265 || pskin != 266 && veh == mycar) // Guessing that those are the skins you want in the car
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, 0x00FF00AA, "This car is only for players with skin 265 or skin 266");
                return 1;
            }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Link skin to a vehicle - by Jacob_T_Harden - 14.01.2011, 23:16
Re: Link skin to a vehicle - by wilko1995 - 14.01.2011, 23:30
Re: Link skin to a vehicle - by Jacob_T_Harden - 15.01.2011, 02:56
Re: Link skin to a vehicle - by Hal - 15.01.2011, 03:22
Re: Link skin to a vehicle - by Jacob_T_Harden - 15.01.2011, 04:13
Re: Link skin to a vehicle - by wilko1995 - 15.01.2011, 06:38

Forum Jump:


Users browsing this thread: 1 Guest(s)