Help with these
#1

Okay, How would I make the following

/adl - Only for level 2 admins+ - Put's a green light on dashboard

/pdl - Only for Police - Put's a blue light on dashboard

/fdl - Only for Fire Department - Put's a red light on dashboard

/hdl - Only for tow trucks - Put's a yellow light on the roof.


But you have to type

/pdl to put it on and /pdl again to turn it off with this: /pdl 1 or /pdl 2?
Reply
#2

you'll have to do something like this:

pawn Код:
new sirens[MAX_VEHICLES];
//I don't know a shit about these functions but I hope you get the point
YCMD:adl(help, playerid, params[]){
//check if the player is a admin
vid = GetVehicleID(playerid);
if(sirens[vid] == 0){
sirens[vid] = CreateObject()//create a object as the siren
AttatchObjecToVehicle(vid, sirens[vid]);
}
else{
DeleteObject(sirens[vid]);
}

}
Do you get how to make it?

Hope i helped
Reply
#3

I thought i t would be along the lines off

pawn Код:
new ADL[MAX_VEHICLES];
new PDL[MAX_VEHICLES];
new FDL[MAX_VEHICLES];
new HDL[MAX_VEHICLES];
Then the cmds the same but different for each one..
Reply
#4

Is it possible?
Reply
#5

Why won't you just try it? You are right, just replace sirens variable in Ranama code with your corresponding variable, and you're good to go
Reply
#6

When I done them news it is like this

pawn Код:
CMD:adl(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] > 2 && ADL[VID] == 0
    {
        // CReate the object
    }
    else
    {
        //Remove the object
    }
}
?
Reply
#7

Anyone can help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)