Bug Help me!
#1

Код:
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 || 520)  //naudoti || masina ||
        {
            if( GetPlayerSkin(playerid) != 27 || 287) //naudoti || skinas ||
            {
                //If their skin is not 27
                //Remove them and send message.
                RemovePlayerFromVehicle( playerid );
                SendClientMessage( playerid,0xFF000000, "My Text" );//-1
                return 1;
            }
            else
            {
                SendClientMessage(playerid, 0xFF000000, "My Text");
                return 1;
            }
        }
    }
    return 1;
}
I added this code into my gamemode. After that, my riding NPC has been teleported near spawn, and the BUS was near him. How can i make this code for more skins and more vehicles. Ex. Hydra for soldier skin, police car for officer...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)