Subwoofer
#8

Код:
	if(!strcmp(cmd, "/subwoofer", true))
	{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
		new vid = GetPlayerVehicleID(playerid);
		new CurrentVehicle;
    	new CurrentDriver[64];
		new sendername[MAX_PLAYER_NAME];
		GetPlayerName(playerid,sendername,sizeof(sendername));
		CurrentVehicle = GetPlayerVehicleID(playerid);

	    if(CarInfo[CurrentVehicle][cOwned] == 1)
		{
        	if(strfind(CarInfo[CurrentVehicle][cOwner], CurrentDriver, true) != -1)
			{
	       		if(PlayerInfo[playerid][pSubwoofer])
	            {
		            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 installs a subwoofer into the car", sendername);
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					}
      				else
			        {
			        SubwooferCar[playerid] = 0;
					DestroyObject(Sub[vid][0]);
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s removes a subwoofer from the car", 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;
        }
		else
		{
            //This is where you place code affecting a player who doesnt own the car but tried to attatch a subwoofer
			return 1;
        }
    }
	else
    {
        //this is where you place code affecting a player trying to put a subwoofer in a non-owned car
		return 1;
    }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, " You are not in the drivers seat of a car.");
    return 1;
}
}
Its not working.
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: 2 Guest(s)