Restricted Vehicles
#1

I've made restricted vehicles on my server.
Now, when you enter a vehicle it'll kick you out. But this is not what I want.

How it is now on my test server:

http://www.youtube.com/watch?v=diAiL...ature=*********

How I want it to be:

http://www.youtube.com/watch?v=hi-Ym...ature=*********

My current OnPlayerStateChange

pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
if(PlayerInfo[playerid][pFaction] != 1)
{
    new vehicleid2 = GetPlayerVehicleID(playerid);
    if(vehicleid2 == lspdcar[0])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[1])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[2])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[3])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[4])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    if(vehicleid2 == lspdcar[5])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[6])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    if(vehicleid2 == lspdcar[7])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[8])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[9])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[10])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[11])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[12])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[13])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[14])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[15])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[16])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[17])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[18])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[19])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[20])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[21])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[22])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[23])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[24])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[25])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    else if(vehicleid2 == lspdcar[26])
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_BLUE, "You're not LSPD!");
    return 1;
    }
    }
(NOTE: this is not my whole OnPlayerStateChange, it's just to let you guys see how it looks like.)

Does anybody of you know how to make it like the second video?
Reply


Messages In This Thread
Restricted Vehicles - by Da_Noob - 25.01.2013, 08:32
Re: Restricted Vehicles - by Babul - 25.01.2013, 08:54
Re: Restricted Vehicles - by Da_Noob - 25.01.2013, 14:33
Re: Restricted Vehicles - by Sime30 - 25.01.2013, 14:44
Re: Restricted Vehicles - by Da_Noob - 25.01.2013, 14:52
Re: Restricted Vehicles - by Sime30 - 25.01.2013, 14:58
Re: Restricted Vehicles - by Da_Noob - 25.01.2013, 21:12
Re: Restricted Vehicles - by SchurmanCQC - 25.01.2013, 21:14

Forum Jump:


Users browsing this thread: 3 Guest(s)