04.06.2014, 20:05
Error:
Command:
Код:
warning 217: loose indentation warning 217: loose indentation
Код:
CMD:bowner(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 4) { SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command."); return 1; } new string[128], houseid, ownername; if(sscanf(params, "dus[64]", houseid, ownername)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /bowner [Business ID] [Player]"); if(!IsPlayerConnected(ownername)) { return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified."); } if(PlayerInfo[ownername][pBusiness] != INVALID_BUSINESS_ID && PlayerInfo[ownername][pBusiness2] != INVALID_BUSINESS_ID) { return SendClientMessageEx(playerid, COLOR_GREY, "That player already owns another business."); } if(PlayerInfo[ownername][pBusiness] == INVALID_BUSINESS_ID) { Businesses[houseid][bOwner] = GetPlayerSQLId(ownername); strcpy(Businesses[houseid][bOwnerName], GetPlayerNameEx(ownername), MAX_PLAYER_NAME); PlayerInfo[ownername][pBusiness] = houseid; PlayerInfo[ownername][pBusinessRank] = 5; SaveBusiness(houseid); OnPlayerStatsUpdate(ownername); RefreshBusinessPickup(houseid); SendClientMessageEx(playerid, COLOR_GREY, "You have modified the owner of the business."); } else if(PlayerInfo[ownername][pBusiness2] == INVALID_BUSINESS_ID) { Businesses[houseid][bOwner] = GetPlayerSQLId(ownername); strcpy(Businesses[houseid][bOwnerName], GetPlayerNameEx(ownername), MAX_PLAYER_NAME); PlayerInfo[ownername][pBusiness2] = houseid; PlayerInfo[ownername][pBusinessRank2] = 5; SaveBusiness(houseid); OnPlayerStatsUpdate(ownername); RefreshBusinessPickup(houseid); SendClientMessageEx(playerid, COLOR_GREY, "You have modified the owner of the business."); } [COLOR="rgb(139, 0, 0)"]format(string, sizeof(string), "[ADMIN] %s modified Owner on Business %d to %s", GetPlayerNameEx(playerid), houseid, GetPlayerNameEx(ownername));[/COLOR] Log("logs/shoplog.log", string); return 1; }