help?
#8

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Show us OnPlayerEnterVehicle
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[128];
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(Spectate[i] != 255)
            {
                PlayerSpectateVehicle(i,vehicleid);
            }
        }
    }
    if(IsAGSFCar(vehicleid) && IsPlayerAMemberOf(playerid) != 1)
        {
            format(string,sizeof(string),"You can't drive this vehicle because you are not a member of the Grove Gang!");
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            RemovePlayerFromVehicle(playerid);
        }
        else if(IsABCar(vehicleid) && IsPlayerAMemberOf(playerid) != 2)
        {
            format(string,sizeof(string),"You can't drive this vehicle because you are not a member of the Ballas Gang");
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            RemovePlayerFromVehicle(playerid);
        }
        else if(IsALCNCar(vehicleid) && IsPlayerAMemberOf(playerid) != 3)
        {
            format(string,sizeof(string),"You can't drive this vehicle because you are not a member of the La Cosa Nostra Mafia");
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            RemovePlayerFromVehicle(playerid);
        }
        else if(IsAYCar(vehicleid) && IsPlayerAMemberOf(playerid) != 4)
        {
            format(string,sizeof(string),"You can't drive this vehicle because you are not a member of the Yakuza Mafia");
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            RemovePlayerFromVehicle(playerid);
        }
        else if(IsAAZTCar(vehicleid) && IsPlayerAMemberOf(playerid) != 5)
        {
            format(string,sizeof(string),"You can't drive this vehicle because you are not a member of the Aztecas Gang!");
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            RemovePlayerFromVehicle(playerid);
        }
        else if(IsAVAGCar(vehicleid) && IsPlayerAMemberOf(playerid) != 6)
        {
            format(string,sizeof(string),"You can't drive this vehicle because you are not a member of the Vagos Gang!");
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            RemovePlayerFromVehicle(playerid);
        }
        else if(IsAHCar(vehicleid) && IsPlayerAMemberOf(playerid) != 7)
        {
            format(string,sizeof(string),"You can't drive this vehicle because you are not a member of the Hitmen Agency");
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Reply


Messages In This Thread
help? - by Black_Sun1 - 14.02.2011, 20:07
Re: help? - by Ash. - 14.02.2011, 20:10
Re: help? - by Black_Sun1 - 14.02.2011, 20:37
Re: help? - by Black_Sun1 - 15.02.2011, 17:50
Re: help? - by Ash. - 15.02.2011, 17:59
Re: help? - by Black_Sun1 - 15.02.2011, 18:40
Re: help? - by Ash. - 15.02.2011, 18:46
Re: help? - by Black_Sun1 - 15.02.2011, 19:11
Re: help? - by Black_Sun1 - 15.02.2011, 19:45
Re: help? - by Black_Sun1 - 16.02.2011, 16:19

Forum Jump:


Users browsing this thread: 1 Guest(s)