SA-MP Forums Archive
[Help]Faction Car - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help]Faction Car (/showthread.php?tid=229053)



[Help]Faction Car - austin070 - 20.02.2011

Hey guys, got a question. I have taxis set to the taxi drive faction in my gamemode. For some reason, it allows civilians to enter the taxis. I have the exact same code for the police vehicles and it works on those. Can anyone help? Here is the code:

pawn Код:
if(newstate == 2)
    {
        new CarCheck = GetPlayerVehicleID(playerid);
        if(CarCheck == Cars[taxi1] || CarCheck == Cars[taxi2] || CarCheck == Cars[taxi3] || CarCheck == Cars[taxi4] || CarCheck == Cars[taxi5] || CarCheck == Cars[taxi6])
        {
            if(gTeam[playerid] != 3)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You are not a taxi driver!");
                return 1;
            }
            else
            {
                return 1;
            }
        }
        return 1;
    }



Re: [Help]Faction Car - (SF)Noobanatior - 21.02.2011

coz im guessing you want the modelid not the vehicle id