Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Make this command toggle?

$
0
0
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 Code:

new glob4;
new 
glob3

PHP Code:

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!!!!!

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>