Pomoc

Započeo Stefan Lujicc, Novembar 22, 2024, 00:26:02 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Pozz, zna li neko zasto su mi neke komande odjednom prestale raditi tj kada ih ukucam izadje UNKNOWM COMMAND.. na localhostu je ali radilo je sve , ne izlaze nikakvi errori u compile

Formular ti fali. Pošalji server_log i posalji komande te koje ti ne rade.
»Sve što je na Zemlji, prolazno je...«

Citat: Dragi poslato Novembar 22, 2024, 14:29:10 POSLE PODNEFormular ti fali. Pošalji server_log i posalji komande te koje ti ne rade.
Komadne:

CMD:lideri(playerid, params[])
{
   new lista[2048], text[128];
   if(brojorg < 1) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Organizacije jos uvek nisu napravljene!");
   for(new i = 1; i <= brojorg; i++)
   {
       format(text, sizeof(text), "{DAA520}[{FFFFFF}%d{DAA520}] - {DAA520}Ime: {FFFFFF}%s - {DAA520}Lider: {FFFFFF}%s\n", i, OrgInfo[orgIme], OrgInfo[orgLeader]);
       strcat(lista, text);
   }
   ShowPlayerDialog(playerid, DIALOG_ORGLEADERS, DIALOG_STYLE_MSGBOX, "{DAA520}Lista Lidera", lista, "{FFFFFF}Napusti", "");
   return 1;
}

CMD:organizacije(playerid, params[])
{
   new lista[1024], text[128];
   if(brojorg < 1) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Organizacije jos uvek nisu napravljene!");
   for(new i = 1; i <= brojorg; i++)
   {
       format(text, sizeof(text), "{DAA520}[{FFFFFF}%d{DAA520}] - {FFFFFF}%s\n", i, OrgInfo[orgIme]);
       strcat(lista, text);
   }
   ShowPlayerDialog(playerid, DIALOG_ORGLIST, DIALOG_STYLE_MSGBOX, "{DAA520}Lista Organizacija", lista, "{FFFFFF}Napusti", "");
   return 1;
}

CMD:postavilidera(playerid, params[])
{
   if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Niste ovlasceni za upotrebu ove komande (AL 6+).");
   if(brojorg < 1) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Organizacije jos uvek nisu napravljene!");
   new id, orgid, ime[128], string[128];
   new playerName[MAX_PLAYER_NAME];
   if(sscanf(params, "si", playerName, orgid)) return SCM(playerid, CRVENA, "[BE:RP]: Koristite: {FFFFFF}/postavilidera (ID/Ime Igraca) (ID Organizacije).");
   if(!IsPlayerConnected(id)) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Igrac nije povezan sa serverom.");
   if(PlayerInfo[id][pLeader] != 0) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Igrac je vec lider neke organizacije!");
   if(orgid < 1 || orgid > brojorg) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Uneli ste netacan ID organizacije!");
   GetPlayerName(id, ime, sizeof(ime));
   PlayerInfo[id][pLeader] = orgid;
   OrgInfo[orgid][orgLeader] = ime;
   SavePlayer(id);
   SaveOrg(orgid);
   format(string, sizeof(string), "{DAA520}[BE:RP]: {FFFFFF}Uspesno ste postavili lidera organizacije {DAA520}%s {FFFFFF} igracu {DAA520}%s.", OrgInfo[orgid][orgIme], ime);
   SCM(playerid, -1, string);
   new adminName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, adminName, sizeof(adminName));
    format(string, sizeof(string), "{DAA520}[BE:RP]: {FFFFFF}Postavljeni ste za lidera organizacije {DAA520}%s{FFFFFF} od strane {DAA520}%s.", OrgInfo[orgid][orgIme], adminName);
    SCM(id, -1, string);
   Delete3DTextLabel(orgLabel[orgid]);
   format(string, sizeof(string), "{DAA520}[ {FFFFFF}%s {DAA520} ]\n{FFFFFF}Lider: {DAA520}%s", OrgInfo[orgid][orgIme], OrgInfo[orgid][orgLeader]);
   orgLabel[orgid] = Create3DTextLabel(string, COLOR_BLACK, OrgInfo[orgid][orgX], OrgInfo[orgid][orgY], OrgInfo[orgid][orgZ], 20.0, 0, 0);
   return 1;
}

CMD:kreirajorg(playerid, params[])
{
   if(PlayerInfo[playerid][pAdmin] < 7) return SCM(playerid, CRVENA, "[GRESKA]: {FFFFFF}Niste ovlasceni za upotrebu ove komande!");
   if(editaorg[playerid] != -1) return SCM(playerid, CRVENA, "[BE:RP]: {FFFFFF}Vec pravite/editujete organizacuju!");
   new Float:X, Float:Y, Float:Z, i = NewID(2), nikostring[128];
   format(nikostring, sizeof(nikostring), "Niko");
   editaorg[playerid] = i;
   OrgInfo[orgLeader] = nikostring;
   OrgInfo[orgMember1] = nikostring;
   OrgInfo[orgMember2] = nikostring;
   OrgInfo[orgMember3] = nikostring;
   OrgInfo[orgMember4] = nikostring;
   OrgInfo[orgMember5] = nikostring;
   OrgInfo[orgMember6] = nikostring;
   OrgInfo[orgMember7] = nikostring;
   OrgInfo[orgMember8] = nikostring;
   OrgInfo[orgMember9] = nikostring;
   OrgInfo[orgMember10] = nikostring;
   OrgInfo[orgMember11] = nikostring;
   OrgInfo[orgMember12] = nikostring;
   OrgInfo[orgMember13] = nikostring;
   OrgInfo[orgMember14] = nikostring;
   OrgInfo[orgMember15] = nikostring;
   OrgInfo[orgMember16] = nikostring;
   OrgInfo[orgMember17] = nikostring;
   OrgInfo[orgMember18] = nikostring;
   OrgInfo[orgMember19] = nikostring;
   OrgInfo[orgMember20] = nikostring;
   OrgInfo[orgSefMoney] = 0;
   OrgInfo[orgSefMats] = 0;
   OrgInfo[orgSefDrugs] = 0;
   GetPlayerPos(playerid, X, Y, Z);
   OrgInfo[orgX] = X;
   OrgInfo[orgY] = Y;
   OrgInfo[orgZ] = Z;
   orgPickup = CreatePickup(19132, 1, X, Y, Z);
   SCM(playerid, COLOR_BLUE, "[BE:RP]: {FFFFFF}Uspesno ste zapoceli kreiranje organizacije!");
   ShowPlayerDialog(playerid, DIALOG_ORGIME, DIALOG_STYLE_INPUT, "{DAA520}Ime Organizacije", "{FFFFFF}Unesite zeljeno ime organizacije.", "Potvrdi", "Odustani");
   brojorg++;
   return 1;
}

====================================================================================
EVO SERVER LOG ZADNJIH NEKOLIKO PUTA:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[15:54:24] filterscripts = ""  (string)
[15:54:24]
[15:54:24] Server Plugins
[15:54:24] --------------
[15:54:24]  Loading plugin: sscanf
[15:54:24]

[15:54:24]  ===============================

[15:54:24]       sscanf plugin loaded.     

[15:54:24]          Version:  2.8.3       

[15:54:24]   (c) 2018 Alex "Y_Less" Cole 

[15:54:24]  ===============================

[15:54:24]   Loaded.
[15:54:24]  Loading plugin: streamer
[15:54:24]

*** Streamer Plugin v2.9.5 by Incognito loaded ***

[15:54:24]   Loaded.
[15:54:24]  Loaded 2 plugins.

[15:54:24]
[15:54:24] Filterscripts
[15:54:24] ---------------
[15:54:24]   Loaded 0 filterscripts.

[15:54:24] 
[15:54:24] 
[15:54:24] 
[15:54:24]  =======================================
[15:54:24]  |                                     |
[15:54:24]  |        YSI version 3.09.0684        |
[15:54:24]  |        By Alex "Y_Less" Cole        |
[15:54:24]  |                                     |
[15:54:24]  =======================================
[15:54:24] 
[15:54:24] 
[15:54:24] 
[15:54:26]
----------------------------------
[15:54:26]  SERVER | by Lujic
[15:54:26] ----------------------------------

[15:54:26] Number of vehicle models: 8
[15:54:54] [connection] 127.0.0.1:64851 requests connection cookie.
[15:54:55] [connection] incoming connection: 127.0.0.1:64851 id: 0
[15:54:56] [join] Stefan_Lujic has joined the server (0:127.0.0.1)
[15:55:01] [part] Stefan_Lujic has left the server (0:2)

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[15:55:20] filterscripts = ""  (string)
[15:55:20]
[15:55:20] Server Plugins
[15:55:20] --------------
[15:55:20]  Loading plugin: sscanf
[15:55:20]

[15:55:20]  ===============================

[15:55:20]       sscanf plugin loaded.     

[15:55:20]          Version:  2.8.3       

[15:55:20]   (c) 2018 Alex "Y_Less" Cole 

[15:55:20]  ===============================

[15:55:20]   Loaded.
[15:55:20]  Loading plugin: streamer
[15:55:20]

*** Streamer Plugin v2.9.5 by Incognito loaded ***

[15:55:20]   Loaded.
[15:55:20]  Loaded 2 plugins.

[15:55:20]
[15:55:20] Filterscripts
[15:55:20] ---------------
[15:55:20]   Loaded 0 filterscripts.

[15:55:20] 
[15:55:20] 
[15:55:20] 
[15:55:20]  =======================================
[15:55:20]  |                                     |
[15:55:20]  |        YSI version 3.09.0684        |
[15:55:20]  |        By Alex "Y_Less" Cole        |
[15:55:20]  |                                     |
[15:55:20]  =======================================
[15:55:20] 
[15:55:20] 
[15:55:20] 
[15:55:20]
----------------------------------
[15:55:20]  SERVER | by Lujic
[15:55:20] ----------------------------------

[15:55:20] Number of vehicle models: 8
[15:55:42] [connection] 127.0.0.1:57770 requests connection cookie.
[15:55:43] [connection] incoming connection: 127.0.0.1:57770 id: 0
[15:55:43] [join] Lujic has joined the server (0:127.0.0.1)
[15:56:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[15:56:10] sscanf warning: Strings without a length are deprecated, please add a destination size.
[15:56:58] [part] Lujic has left the server (0:1)
Poslednja Izmena: Novembar 22, 2024, 15:59:25 POSLE PODNE od Stefan Lujicc

if(sscanf(params, "s[32]i", playerName, orgid)) return SCM(playerid, CRVENA, "[BE:RP]: Koristite: {FFFFFF}/postavilidera (ID/Ime Igraca) (ID Organizacije).");
Pogledaj koliki ti je MAX_PLAYER_NAME, lupih da je 32, ali uglavnom baca ti sscanf warning da nisi uneo velicinu stringa unutar njega, posle s mora ici velicina

Pirmer :

new playerCountry[32];
if(sscanf(params, "s[32]", playerCountry)) return 1;

Procitaj : https://sampforum.blast.hk/showthread.php?tid=570927

Takodje ubaci crashdetect kao prvi plugin, za ubuduce

Citat: V01D poslato Novembar 22, 2024, 16:30:38 POSLE PODNEif(sscanf(params, "s[32]i", playerName, orgid)) return SCM(playerid, CRVENA, "[BE:RP]: Koristite: {FFFFFF}/postavilidera (ID/Ime Igraca) (ID Organizacije).");
Pogledaj koliki ti je MAX_PLAYER_NAME, lupih da je 32, ali uglavnom baca ti sscanf warning da nisi uneo velicinu stringa unutar njega, posle s mora ici velicina

Pirmer :

new playerCountry[32];
if(sscanf(params, "s[32]", playerCountry)) return 1;

Procitaj : https://sampforum.blast.hk/showthread.php?tid=570927

Takodje ubaci crashdetect kao prvi plugin, za ubuduce

evo izmenio sam nesto i dodao crashdetect ali nesto ne zeli da ga ucita:

...
gamemode0 berp 1
plugins crashdetect sscanf streamer
filterscripts
announce 0
chatlogging 0
...

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

filterscripts = ""  (string)

Server Plugins
--------------
 Loading plugin: crashdetect
  Failed.
 Loading plugin: sscanf


 ===============================

      sscanf plugin loaded.

         Version:  2.8.3

  (c) 2018 Alex "Y_Less" Cole

 ===============================

  Loaded.
 Loading plugin: streamer


*** Streamer Plugin v2.9.5 by Incognito loaded ***

  Loaded.
 Loaded 2 plugins.


Started server on port: 7777, with maxplayers: 50 lanmode is OFF.


Filterscripts
---------------
  Loaded 0 filterscripts.




 =======================================
 |                                     |
 |        YSI version 3.09.0684        |
 |        By Alex "Y_Less" Cole        |
 |                                     |
 =======================================




----------------------------------
 SERVER| by Lujic
----------------------------------

Number of vehicle models: 8


Necu sad da brisem, u buduce, moras da postavljas i formular...