08.12.2011, 17:48
What is wrong? Server say: Unknow commands.
Код:
CMD:subwoofer(playerid, params[]) { new i; new Sub[MAX_VEHICLES][6]; new Subwooferincar[MAX_PLAYERS]; new vid = GetPlayerVehicleID(playerid); i = GetBuyCarId(playerid); if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, COLOR_WHITE, "You are not a car" ); if(PlayerInfo[playerid][pSubwoofer] == 0) return SendClientMessage(playerid, COLOR_WHITE, "* You dont have subwoofer."); if(PlayerInfo[playerid][pSQLID] != AutoInfo[i][cOwner]) return SendClientMessage(playerid, COLOR_GRAD1, "Its not your car."); if(!Subwooferincar[playerid]) { Subwooferincar[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); SendEmoteMessage(playerid, "put subwoofer in car."); CarInfo[i][cSubwoofer]++; PlayerInfo[playerid][pSubwoofer]--; OnCarUpdate(i); } else { Subwooferincar[playerid] = 0; DestroyObject(Sub[vid][0]); SendEmoteMessage(playerid, "remove subwoofer."); CarInfo[i][cSubwoofer]--; PlayerInfo[playerid][pSubwoofer]++; OnCarUpdate(i); } return 1; }