/siren command, won't work
#1

Made this command. No errors, however it doesn't work in the server. It just doesn't do anything at all, even sending a message.
\

Yes, the indentation is weird, however it's not like that in the script.
Код:
CMD:siren(playerid, params[])
{
	new vehicleid = GetPlayerVehicleID(playerid);
	{
	    if(!IsACop(playerid)) return SCM(playerid, GREY, "your bitch ass needa be a cop!");
	    {
	        if(!IsPlayerDriver(playerid)) return SCM(playerid, GREY, "You aint in no vehicle!");
			if(IsValidObject(Siren[vehicleid]))
			{
			    DestroyObject(Siren[vehicleid]);
			    GameTextForPlayer(playerid, "~g~Siren Off", 5000, 5);
			    SirenOn[vehicleid] = 0;
			}
			if(!(SirenOn[vehicleid] == 0))
			if(!GetVehicleModel(playerid)) return SCM(playerid, GREY, "This vehicle doesn't support a siren nigga");
			{
			    switch(GetVehicleModel(playerid))
			    {
			        case 402: //buffalo
			        {
			            Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.0, 1.0, 0.75, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 411: //infernus
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.75, 0.0, 0.50, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 412: //voodoo
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 416: //cheetah
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.0, 0.25, 0.075, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 426: //premier
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.75, 0.50, 0.25, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 429: //banshee
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.000500,0.123000,0.299999,0.000000,0.000000,0.000000);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 436: //previon
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.0, 0.25, 0.3, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 444: //monster
					{
     					Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.0, 0.8, 0.75, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 451: //turismo
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.0, 0.20, 0.3, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					case 467: //oceanic
					{
					    Siren[vehicleid] = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
			            AttachObjectToVehicle(Siren[vehicleid], vehicleid, 0.0, 0.0, 0.8, 0.0, 0.0, 0.0);
			            GameTextForPlayer(playerid, "~g~ Siren On", 5000, 5);
			            SirenOn[vehicleid] = 1;
					}
					    
				}
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
/siren command, won't work - by Gecko75 - 05.09.2013, 05:00
Re: /siren command, won't work - by WopsS - 05.09.2013, 06:49

Forum Jump:


Users browsing this thread: 1 Guest(s)