SA-MP Forums Archive
Only let players with certain skin enter a vehicle - 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)
+--- Thread: Only let players with certain skin enter a vehicle (/showthread.php?tid=366561)



Only let players with certain skin enter a vehicle - Eminem 2ka9 - 07.08.2012

I only want players with 500 score and id 121 to be able to get into a hydra, I got this code but it only works when the player is wearing the skin, when I'm wearing any other skin then I can enter it even with 1 score! It's weird how do I fix?

My current Code:
Код:
if(GetVehicleModel(vehicleid) == 520 && GetPlayerScore(playerid) < 500 && GetPlayerSkin(playerid) == 121)

    {
	    SendClientMessage(playerid, COLOR_RED, "Rank Major & Special Ops Team Required!(500 Score)  /rank to view yours");
        RemovePlayerFromVehicle(playerid);


    }



Re: Only let players with certain skin enter a vehicle - SnG.Scot_MisCuDI - 07.08.2012

pawn Код:
if(GetVehicleModel(vehicleid) == 520)
{
    if(GetPlayerScore(playerid) < 500 && GetPlayerSkin(playerid) != 121)
    {
        SendClientMessage(playerid, COLOR_RED, "Rank Major & Special Ops Team Required!(500 Score)  /rank to view yours");
        RemovePlayerFromVehicle(playerid);
    }
}