[Help]How to make a Gang car.
#1

Yeah,Like topic said......

How to make a Gang vehicle that gang only can drive (When Cilivian or other gang is in Driver pos they will be out from the car automatic)
Reply
#2

http://forum.sa-mp.com/index.php?topic=114903.0
Reply
#3

Which page??
Reply
#4

How do you define your gangs?
Reply
#5

I think it is this one...

Quote:

if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) //Admin spawn
{
SetPlayerColor(playerid, COLOR_RED);
SetPlayerPos(playerid, -2079.825,1398.963,7.100666);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}

Quote:

else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15)//Admin
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "єШ¤¤Е№НЎЎЕШиБ"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "бНґБФ№·СиЗд»"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "бНґБФ№ЎФЁЎГГБ"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "бНґБФ№К¤ГФ»µм"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "ГН§бНґБФ№гЛ*и"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "бНґБФ№гЛ*и"; }
else { rtext = "б·кЎ«ХиБЧНгЛБи"; }
}

Reply
#6

pawn Код:
new gangcar;
Under OnGameModeInit, where you create vehicles.
pawn Код:
gangcar = AddStaticVehicle(...
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(vehicleid == gangcar && PlayerInfo[playerid][pMember] != 15)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, 0xFFFFFFFF, "You are not part of the gang!");
        }
    }
}
Reply
#7

Thank sir!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)