Scripting help :D for vehicle permissions
#1

Hey guys I just need help with a scripting, I am what you would call a n00b but I am still learning.

Okay so I want to have a script that kicks players out of the car when “players” get in specific vehicles just players not admins the specific vehicles are
Hydra
Hunter
Sea sparrow
And can there be a message saying this is a admin vehicle or military.
For every helpful comment I will give REP’s

THANKS
Reply
#2

You can find this in tutorials,and Optimize your code As you like,it's explained.
Reply
#3

you made it sooo good you got a copy?
Reply
#4

pawn Code:
new Hydras[30];

IsAHydra(carid)
{
    for(new v = 0; v < sizeof(Hydras); v++)
    {
        if(carid == Hydras[v]) return 1;
    }
    return 0;
}

OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsAHydra(vehicleid))
    {
        if(IsPlayerAdmin(playerid))
        {
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(playerid, X, Y, Z);
            SetPlayerPos(playerid, X, Y, Z);
            SendClientMessage(playerid, -1, "You can't enter Hydras");
            return 1;
        }
       
    }
    return 1;
}
don't forget to add Hydras[number] = before each hydra
Reply
#5

I saved this 100 times lol, hydra numbers? :/
Reply
#6

The Hydras[number] =
You replace number by 0,1,2,3,4 you know
Reply
#7

:/ 0 1 2 3 4? What is this for? and where to replace, here? new Hydras[30];
Reply
#8

No,i said Place Behinde Each Hydra you spawned This Hydras[1] = and Hydras[2] = Like this for each hydra
Reply
#9

But I don't know how many hydra's are there? can I have any and every hydra
Reply
#10

Do you want so only admins can use hydra ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)