Link skin to a vehicle
#1

Ok.. Ive been experimenting with PAWNO since I am new.. Iam working on my very first script, Its finally playable.. Just adding cool features.. Anyways I was wondering how I can link a skin to a vehicle, I learned how to make certain skins only be able to use commands.. But can somebody show me how to do the same thing with like medic skins to an ambulance ETC. Using this format or close to it
Код:
new pskin=GetPlayerSkin(playerid);
    if(pskin == 265 || pskin == 266 ||
Thank you!
Reply
#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
#3

Is there anyway I can use that one thing for many vehicles? If so, How?
Reply
#4

Quote:
Originally Posted by Jacob_T_Harden
Посмотреть сообщение
Is there anyway I can use that one thing for many vehicles? If so, How?
If you want it for specific vehicles, just run an
pawn Код:
if
statment above it all to check for specific vehicle ids(or group id thats set to a car (( if thats in place)) )

You will have multiple snippets like that for each skin that is linked to a vehicle


(i just realized that i do not make sense.)
Reply
#5

?? That made no sense...
Can you explain a little better? =)
Reply
#6

check you PM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)