Help with these - 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: Help with these (
/showthread.php?tid=365904)
Help with these -
sanplayer - 04.08.2012
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?
Re: Help with these -
Ranama - 04.08.2012
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
Re: Help with these -
sanplayer - 04.08.2012
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..
Re: Help with these -
sanplayer - 04.08.2012
Is it possible?
Re: Help with these -
Misiur - 04.08.2012
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
Re: Help with these -
sanplayer - 04.08.2012
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
}
}
?
Re: Help with these -
sanplayer - 05.08.2012
Anyone can help?