Make this command toggle?
#1

Hello again! So I would like to make this command "toggable", like if I input "/siren" a siren will appear, but if I input "/siren" again, the siren would disappear with it's message.
PHP код:
new glob4;
new 
glob3
PHP код:
CMD:siren(playeridparams[])
{
    if(
fInfo[playerid][fPolice] != 1) return SCM(playeridCOR_CINZA"You are not a Police Officer.");
    
glob4 GetPlayerVehicleID(playerid);
    
glob3 CreateObject(18646, -0.70.150.850.00.096.00);
    
AttachObjectToVehicle(glob3glob40.014999, -0.3799990.9149990.0000000.0000000.000000);
        
SendClientMessage(playeridCOLOR_GREY"You turned your siren on.");
    return 
1;

Thank you!!!!!
Reply


Messages In This Thread
Make this command toggle? - by insus100 - 02.12.2017, 22:48
Re: Make this command toggle? - by MEW273 - 02.12.2017, 23:02
Re: Make this command toggle? - by insus100 - 02.12.2017, 23:12
Re: Make this command toggle? - by MEW273 - 02.12.2017, 23:15
Re: Make this command toggle? - by thefirestate - 02.12.2017, 23:16
Re: Make this command toggle? - by insus100 - 02.12.2017, 23:16
Re: Make this command toggle? - by thefirestate - 02.12.2017, 23:20
Re: Make this command toggle? - by insus100 - 02.12.2017, 23:26

Forum Jump:


Users browsing this thread: 4 Guest(s)