#1

Hey i am using ravens roleplay and i want only taxi drivers to drive the taxi's can someone help please
i will rep if someone helps thanks so much
Reply
#2

You want to restrict the vehicle to a certain job?I edited this of zGaming script replace the codes to the custom codes of you script.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!ispassenger)
    {
        if(IsTaxiVehicle(vehicleid) && PlayerInfo[playerid][pJob] != yourslotoftaxijobhere)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_ORANGE, " You cannot enter this vehicle as you are not a taxi driver.");
        }

    }
    return 1;
}
P.S: dont use these heavy scripts if you cant handle them.
Reply
#3

under OnPlayerEnterVehicle check if they got the right skinid.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerSkin(playerid)==/*the id of the skin*/ && GetVehicleModel(vehicleid) == 420)
        {
            //do what ever
        }else{
            ClearAnimations(playerid);
            SendClientMessage(playerid,-1,"You need to be a taxi driver");
        }
return 1;
}
EDITED

and stop with the
Quote:

will rep if someone helps

i came here to help because i want to not because of ur rep ;X
Reply
#4

i want that only if the player is a taxi driver he or she can enter taxi
Reply
#5

Quote:
Originally Posted by WiseRice
Посмотреть сообщение
i want that only if the player is a taxi driver he or she can enter taxi
what do you think the code in my 1st post does ehhh ?
the player can only get in the taxi if they have the taxi driver skin!
if you use some other type variables then change it.
Reply
#6

but anyone can change their skin to taxi driver i want if they have the taxi job
Reply
#7

Then show the variables for the taxi driver!
and implement them instead of the skinid.
Reply
#8

im so lost i dont know how to do this
Reply
#9

if(TransportDuty(vehicleid) && PlayerInfo[playerid][pJob] != TransportDuty)
{
//do what ever
}else{
ClearAnimations(playerid);
SendClientMessage(playerid, COLOR_BLUE,"You need to be a taxi driver");
}
}
return 1;
}
Reply
#10

Sorry for double post use the below one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)