Subwoofer
#1

Код:
	if(!strcmp(cmd, "/subwoofer", true))
	{
 		new vid = GetPlayerVehicleID(playerid);
		if(PlayerInfo[playerid][pSubwoofer])
		{
 		if(!IsPlayerInAnyVehicle(playerid))
		    {
		        SendClientMessage(playerid, COLOR_GREY, " You are not car!");
		        return 1;
			}
			if(!SubwooferCar[playerid])
			{
				SubwooferCar[playerid] = 1;
    			Sub[vid][0] = CreateObject(2232,0,0,0,0,0,0);
    			AttachObjectToVehicle(Sub[vid][0], vid, 0.025002, -1.729998, -0.020000, -74.369995, 87.133476, -3.015000);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "* %s put subwoofer in car.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
			else
			{
				SubwooferAutos[playerid] = 0;
    			DestroyObject(Sub[vid][0]);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "* %s destroy subwoofer.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "* You must buy subwoofer.");
		}
		return 1;
	}
How can I do so that I could only order a mounted subwoofer if you want the second time I have to first remove the first

Sorry bad english.
Reply


Messages In This Thread
Subwoofer - by TouhGear - 25.11.2011, 13:05
Re: Subwoofer - by TouhGear - 25.11.2011, 20:51
Re: Subwoofer - by Rob_Maate - 25.11.2011, 20:59
Re: Subwoofer - by TouhGear - 26.11.2011, 09:39
Re: Subwoofer - by Rob_Maate - 26.11.2011, 09:40
Re: Subwoofer - by TouhGear - 26.11.2011, 10:35
Re: Subwoofer - by Rob_Maate - 26.11.2011, 10:52
Re: Subwoofer - by TouhGear - 26.11.2011, 11:39
Re: Subwoofer - by Rob_Maate - 26.11.2011, 12:07
Re: Subwoofer - by TouhGear - 26.11.2011, 14:03

Forum Jump:


Users browsing this thread: 3 Guest(s)