31.08.2016, 09:12
Guys i have this problem! +REP if solved
Код:
warning 203: symbol is never used: "Dialog_StatsTvrtka" warning 203: symbol is never used: "Tvrtka_Evict"
Код:
Dialog_StatsTvrtka(playerid, response, listitem)
{
if(!response) return 1;
new OtherPlayer, BusID, TDialogList[256];
OtherPlayer = APlayerData[playerid][DialogOtherPlayer];
BusID = APlayerData[OtherPlayer][TrenutnaFirma];
switch (listitem)
{
case 0:
{
format(TDialogList, 256, "%s{00FF00}Naziv Tvrtke{FFFFFF} %s\n", TDialogList, DataTvrtke[BusID][ImeTvrtke]);
format(TDialogList, 256, "%s{00FF00}Zaposlenih{FFFFFF} %i\n", TDialogList, DataTvrtke[BusID][Zaposlenih]);
format(TDialogList, 256, "%s{00FF00}Vlasnik{FFFFFF} %s\n", TDialogList, DataTvrtke[BusID][Vlasnik]);
format(TDialogList, 256, "%s{00FF00}Cijena Tvrtke{FFFFFF} $%i\n", TDialogList, DataTvrtke[BusID][KCijena]);
ShowPlayerDialog(playerid, DialogInfoTvrtke, DIALOG_STYLE_MSGBOX, "Informacije Tvrtke", TDialogList, "Odaberi", "Odustani");
}
case 1:
{
SetPlayerPos(playerid, DataTvrtke[BusID][TvrtkaX], DataTvrtke[BusID][TvrtkaY], DataTvrtke[BusID][TvrtkaZ]);
}
}
return 1;
}
Код:
Tvrtka_Evict(BusID)
{
// Setup local variables
new Msg[128], Name[24], bool:PlayerOnline = false;
// Check if the business is owned
if (DataTvrtke[BusID][Kupljena] == true)
{
// Loop through all players to find the owner (if he's online)
for (new pid; pid < MAX_PLAYERS; pid++)
{
// Check if this player is online
if (IsPlayerConnected(pid))
{
// Get that player's name
GetPlayerName(pid, Name, sizeof(Name));
// Compare if this player has the same name as the owner of the business
if (strcmp(DataTvrtke[BusID][Vlasnik], Name, false) == 0)
{
// Set PlayerOnline to "true"
PlayerOnline = true;
APlayerData[pid][TrenutnaFirma] = 0;
APlayerData[pid][VTvrtke] = false;
format(Msg, 128, "{FF0000}Tvoja tvrtka {FFFF00}\"%s\"{FF0000} je izbrisana", DataTvrtke[BusID][ImeTvrtke]);
SendClientMessage(pid, 0xFFFFFFFF, Msg);
PlayerFile_Save(pid);
break;
}
}
}
// Check if the player was not online
if (PlayerOnline == false)
// Remove the house from the player's account (open the account, remove the data and re-save it)
PlayerFile_RemoveProperty(DataTvrtke[BusID][Vlasnik], 0, BusID);
}
// Clear ownership of the business
DataTvrtke[BusID][Kupljena] = false;
DataTvrtke[BusID][Vlasnik] = 0;
DataTvrtke[BusID][Zarada] = 0;
DataTvrtke[BusID][Zaposlenih] = 0;
DataTvrtke[BusID][Poslova] = 0;
DataTvrtke[BusID][ZadnjaIsplata] = 0;
// Update the entrance of the business
DataTvrtke_UpdateEntrance(BusID);
// Save the businessfile
DataTvrtke_Save(BusID);
}

