Question and help about one function
#1

Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
    //If they got into a car from being on foot.
        if( GetVehicleModel(GetPlayerVehicleID( playerid )) == 428)  //naudoti || masina ||
        {
            if( GetPlayerSkin(playerid) != 27) //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;
}
You see this code? This is for workers with skin 27 and car with id 426.
How can i do more vehicles for skin 27? Or how can i do tank for soldier skin? Or how can i do more vehicles for soldier skin or other skins?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)