Scripting SD only cars + colors
#1

Alright so ima map some sd cars and i need to know how i actually script them in so only sd can use them and script the colors?

also how would i remove any cars already scripted in as i cant see them on my map editor
Reply
#2

I dont understand so right your Question, have you on your Script something like:

Quote:

AddStaticVehicle

?
Reply
#3

AddStaticVehicle(modelid, x coordinate, y coordinate, z coordinate, angle, color1, color2);
This ?
Reply
#4

yh but how do i make it so only sd can enter and if a normal guy tries to enter he cant and it says summit likie you are not in this faction and only people in the faction can enter?
Reply
#5

Define 'sd' ?
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)