Scripting SD only cars + colors
#6

Here, this one is when he tries to enter to block him entering...

pawn Код:
new CopCar[1]; // one car for an example
// OnGameModeInit
CopCar[0] = AddStaticVehicleEx(428, 1544.2725830078, -1684.3175048828, 5.8806247711182, 90, 0, 1,300); //Securicar 1
// ============
forward IsACopCar(carid);
public IsACopCar(carid)
{
    for(new i = 0; i < sizeof(CopCar); i++)
    {
        if(carid == CopCar[i])  return 1;
    }
    return 0;
}

// under OnPlayerEnterVehicle

if (IsACopCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLeader]==1 || PlayerInfo[playerid][pMember]==1) {}
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "You're not in PD!");
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx,  cy, cz);
            }
        }
Reply


Messages In This Thread
[No subject] - by izeatfishz - 25.01.2013, 16:44
AW: Scripting SD only cars + colors - by Blackazur - 25.01.2013, 16:46
Re: Scripting SD only cars + colors - by Sime30 - 25.01.2013, 16:47
Re: Scripting SD only cars + colors - by izeatfishz - 25.01.2013, 16:52
Re: Scripting SD only cars + colors - by Vince - 25.01.2013, 17:02
Re: Scripting SD only cars + colors - by Sime30 - 25.01.2013, 17:10

Forum Jump:


Users browsing this thread: 1 Guest(s)