Lider chat + definisanje simbola

Započeo X-Skyz, Januar 24, 2024, 21:15:10 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Problem(error/warning): Lider chat + definisanje simbola, svakako se ucim skriptati. 34202 : error 017: undefined symbol "lchat" error 017: undefined symbol "Lider" medjutim pokušao sam new lchat[MAX_PLAYERS]; new Lider[MAX_PLAYERS]; i nece tjst ne moze samo se zabaguje još više. Ako neko zna kako se rješava ovo, bio bih mu zahvalan. Samo su ta 2 errora koja ne znam fixati.
Deo skripte: [pawn]YCMD:l(playerid, params[])
{
    //#pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"[Monaco OGC] : "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if((lchat)) return SCM(playerid, -1, ""SRWBOJA"[Monaco OGC] "BELA"/l chat je iskljucen!!");
    if(PlayerInfo[playerid][pAdmin] >= 5 || PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pVlidera] >= 1)
   {
      if(GetTimeEx() < gLeader[playerid] && PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "Ovu komandu mozete koristiti svakih 5 sekundi !");
      {
      if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu jer ste zatvoreni !");
      if(PlayerInfo[playerid][pMutiran] == 1) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu zato sto ste mutirani na chat !");
      if(PlayerInfo[playerid][pMutel] == 1) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu zato sto ste mutirani na /l chatu !");
      new text[256], string[128], sendername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, sendername, sizeof(sendername));
      if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""SRWBOJA"[Monaco OGC] Pomoc | "BELA"/l [tekst]");
      new arank[256];
      if(PlayerInfo[playerid][pLider] == 1) { arank = ""LJUB"LSPD"; }
      else if(PlayerInfo[playerid][pLider] == 2) { arank = ""LJUB"TVF"; }
      else if(PlayerInfo[playerid][pLider] == 3) { arank = ""LJUB"BDT"; }
      else if(PlayerInfo[playerid][pLider] == 4) { arank = ""LJUB"GSF"; }
      else if(PlayerInfo[playerid][pLider] == 5) { arank = ""LJUB"Ballas"; }
      else if(PlayerInfo[playerid][pLider] == 6) { arank = ""LJUB"Novinari"; }
      else if(PlayerInfo[playerid][pLider] == 7) { arank = ""LJUB"CIA"; }
      else if(PlayerInfo[playerid][pLider] == 8) { arank = ""LJUB"PS"; }
      else if(PlayerInfo[playerid][pLider] == 9) { arank = ""LJUB"Condor"; }
      else if(PlayerInfo[playerid][pLider] == 10) { arank = ""LJUB"Hitman"; }
      else if(PlayerInfo[playerid][pLider] == 11) { arank = ""LJUB"BL"; }
      else if(PlayerInfo[playerid][pLider] == 12) { arank = ""LJUB"LCN"; }
      else if(PlayerInfo[playerid][pLider] == 13) { arank = ""LJUB"DNB"; }
      else if(PlayerInfo[playerid][pLider] == 14) { arank = ""LJUB"Taxi"; }
      else if(PlayerInfo[playerid][pLider] == 15) { arank = ""LJUB"Yakuza"; }
      else if(PlayerInfo[playerid][pLider] == 16) { arank = ""LJUB"FBI"; }
      else if(PlayerInfo[playerid][pLider] == 17) { arank = ""LJUB"BCC"; }
      else if(PlayerInfo[playerid][pLider] == 18) { arank = ""LJUB"Vatrogasci"; }
      else if(PlayerInfo[playerid][pLider] == 19) { arank = ""LJUB"DR"; }
      else if(PlayerInfo[playerid][pLider] == 20) { arank = ""LJUB"RM"; }
      else if(PlayerInfo[playerid][pLider] == 21) { arank = ""LJUB"NC"; }
      else if(PlayerInfo[playerid][pLider] == 22) { arank = ""LJUB"LC"; }
      else if(PlayerInfo[playerid][pLider] == 23) { arank = ""LJUB"TBB"; }
      else if(PlayerInfo[playerid][pLider] == 24) { arank = ""LJUB"SAOP"; }
      else if(PlayerInfo[playerid][pLider] == 25) { arank = ""LJUB"VLA"; }
      else if(PlayerInfo[playerid][pVlidera] == 1) { arank = "Vodja Lidera"; }
      else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Head-Admin"; }
      else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Director"; }
      else if(PlayerInfo[playerid][pAdmin] == 7) { arank = "Owner"; }
      else if(PlayerInfo[playerid][pAdmin] == 8) { arank = "Developer"; }
      format(string, sizeof(string), ""GCHAT"[LIDER CHAT] %s [%s | ID:%d"GCHAT"]: "BELA"%s", GetName(playerid), arank, playerid, text);
      Lider(-1,string);
      {
      gLeader[playerid] = GetTimeEx() + 5;
      }
   }
   }
   return 1;
}[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]Vaš odgovor[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): Pawno code problem
I meni kasnije kažu ja lud,retardiran,mangup i ostalo a ono pogledaš LAW organizaciju koja se zove Sheriff Department i u njoj je najveći rank Director umjesto Sheriffa

Citat: X-Skyz poslato Januar 24, 2024, 21:15:10 POSLE PODNE
Problem(error/warning): Lider chat + definisanje simbola, svakako se ucim skriptati. 34202 : error 017: undefined symbol "lchat" error 017: undefined symbol "Lider" medjutim pokušao sam new lchat[MAX_PLAYERS]; new Lider[MAX_PLAYERS]; i nece tjst ne moze samo se zabaguje još više. Ako neko zna kako se rješava ovo, bio bih mu zahvalan. Samo su ta 2 errora koja ne znam fixati.
Deo skripte: [pawn]YCMD:l(playerid, params[])
{
    //#pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"[Monaco OGC] : "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if((lchat)) return SCM(playerid, -1, ""SRWBOJA"[Monaco OGC] "BELA"/l chat je iskljucen!!");
    if(PlayerInfo[playerid][pAdmin] >= 5 || PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pVlidera] >= 1)
   {
      if(GetTimeEx() < gLeader[playerid] && PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "Ovu komandu mozete koristiti svakih 5 sekundi !");
      {
      if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu jer ste zatvoreni !");
      if(PlayerInfo[playerid][pMutiran] == 1) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu zato sto ste mutirani na chat !");
      if(PlayerInfo[playerid][pMutel] == 1) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu zato sto ste mutirani na /l chatu !");
      new text[256], string[128], sendername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, sendername, sizeof(sendername));
      if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""SRWBOJA"[Monaco OGC] Pomoc | "BELA"/l [tekst]");
      new arank[256];
      if(PlayerInfo[playerid][pLider] == 1) { arank = ""LJUB"LSPD"; }
      else if(PlayerInfo[playerid][pLider] == 2) { arank = ""LJUB"TVF"; }
      else if(PlayerInfo[playerid][pLider] == 3) { arank = ""LJUB"BDT"; }
      else if(PlayerInfo[playerid][pLider] == 4) { arank = ""LJUB"GSF"; }
      else if(PlayerInfo[playerid][pLider] == 5) { arank = ""LJUB"Ballas"; }
      else if(PlayerInfo[playerid][pLider] == 6) { arank = ""LJUB"Novinari"; }
      else if(PlayerInfo[playerid][pLider] == 7) { arank = ""LJUB"CIA"; }
      else if(PlayerInfo[playerid][pLider] == 8) { arank = ""LJUB"PS"; }
      else if(PlayerInfo[playerid][pLider] == 9) { arank = ""LJUB"Condor"; }
      else if(PlayerInfo[playerid][pLider] == 10) { arank = ""LJUB"Hitman"; }
      else if(PlayerInfo[playerid][pLider] == 11) { arank = ""LJUB"BL"; }
      else if(PlayerInfo[playerid][pLider] == 12) { arank = ""LJUB"LCN"; }
      else if(PlayerInfo[playerid][pLider] == 13) { arank = ""LJUB"DNB"; }
      else if(PlayerInfo[playerid][pLider] == 14) { arank = ""LJUB"Taxi"; }
      else if(PlayerInfo[playerid][pLider] == 15) { arank = ""LJUB"Yakuza"; }
      else if(PlayerInfo[playerid][pLider] == 16) { arank = ""LJUB"FBI"; }
      else if(PlayerInfo[playerid][pLider] == 17) { arank = ""LJUB"BCC"; }
      else if(PlayerInfo[playerid][pLider] == 18) { arank = ""LJUB"Vatrogasci"; }
      else if(PlayerInfo[playerid][pLider] == 19) { arank = ""LJUB"DR"; }
      else if(PlayerInfo[playerid][pLider] == 20) { arank = ""LJUB"RM"; }
      else if(PlayerInfo[playerid][pLider] == 21) { arank = ""LJUB"NC"; }
      else if(PlayerInfo[playerid][pLider] == 22) { arank = ""LJUB"LC"; }
      else if(PlayerInfo[playerid][pLider] == 23) { arank = ""LJUB"TBB"; }
      else if(PlayerInfo[playerid][pLider] == 24) { arank = ""LJUB"SAOP"; }
      else if(PlayerInfo[playerid][pLider] == 25) { arank = ""LJUB"VLA"; }
      else if(PlayerInfo[playerid][pVlidera] == 1) { arank = "Vodja Lidera"; }
      else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Head-Admin"; }
      else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Director"; }
      else if(PlayerInfo[playerid][pAdmin] == 7) { arank = "Owner"; }
      else if(PlayerInfo[playerid][pAdmin] == 8) { arank = "Developer"; }
      format(string, sizeof(string), ""GCHAT"[LIDER CHAT] %s [%s | ID:%d"GCHAT"]: "BELA"%s", GetName(playerid), arank, playerid, text);
      Lider(-1,string);
      {
      gLeader[playerid] = GetTimeEx() + 5;
      }
   }
   }
   return 1;
}[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]Vaš odgovor[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): Pawno code problem

Za lchat to ti je ono paljenje/gasenje klk vidim to ti je ne potrebno iz razloga jer prvo moras napraviti da se plali gasi cuvanje toga itd itd pa tek onda ubaciti u komandu jer dzabe sklonimo taj undefined symbol kad nema nikakvu funkciju.

A sto se tice "lider" to je chat koji moras da definises. Ja bi ga nazvao LiderChat da se ne bunis.

forward Lider(color, string[]);
public Lider(color, string[]) { foreach(new i : Player) { if(PlayerInfo[pAdmin] >= 5 || PlayerInfo[pLider] >= 1 || PlayerInfo[pVLidera] >= 1) { { SendClientMessage(i, color, string); } } } }

Citat: X-Skyz poslato Januar 24, 2024, 21:15:10 POSLE PODNE
Problem(error/warning): Lider chat + definisanje simbola, svakako se ucim skriptati. 34202 : error 017: undefined symbol "lchat" error 017: undefined symbol "Lider" medjutim pokušao sam new lchat[MAX_PLAYERS]; new Lider[MAX_PLAYERS]; i nece tjst ne moze samo se zabaguje još više. Ako neko zna kako se rješava ovo, bio bih mu zahvalan. Samo su ta 2 errora koja ne znam fixati.
Deo skripte: [pawn]YCMD:l(playerid, params[])
{
    //#pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"[Monaco OGC] : "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
    if((lchat)) return SCM(playerid, -1, ""SRWBOJA"[Monaco OGC] "BELA"/l chat je iskljucen!!");
    if(PlayerInfo[playerid][pAdmin] >= 5 || PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pVlidera] >= 1)
   {
      if(GetTimeEx() < gLeader[playerid] && PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, -1, "Ovu komandu mozete koristiti svakih 5 sekundi !");
      {
      if(PlayerInfo[playerid][pZatvor] != 0) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu jer ste zatvoreni !");
      if(PlayerInfo[playerid][pMutiran] == 1) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu zato sto ste mutirani na chat !");
      if(PlayerInfo[playerid][pMutel] == 1) return SCM(playerid,-1,"Ne mozete koristiti ovu komandu zato sto ste mutirani na /l chatu !");
      new text[256], string[128], sendername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, sendername, sizeof(sendername));
      if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""SRWBOJA"[Monaco OGC] Pomoc | "BELA"/l [tekst]");
      new arank[256];
      if(PlayerInfo[playerid][pLider] == 1) { arank = ""LJUB"LSPD"; }
      else if(PlayerInfo[playerid][pLider] == 2) { arank = ""LJUB"TVF"; }
      else if(PlayerInfo[playerid][pLider] == 3) { arank = ""LJUB"BDT"; }
      else if(PlayerInfo[playerid][pLider] == 4) { arank = ""LJUB"GSF"; }
      else if(PlayerInfo[playerid][pLider] == 5) { arank = ""LJUB"Ballas"; }
      else if(PlayerInfo[playerid][pLider] == 6) { arank = ""LJUB"Novinari"; }
      else if(PlayerInfo[playerid][pLider] == 7) { arank = ""LJUB"CIA"; }
      else if(PlayerInfo[playerid][pLider] == 8) { arank = ""LJUB"PS"; }
      else if(PlayerInfo[playerid][pLider] == 9) { arank = ""LJUB"Condor"; }
      else if(PlayerInfo[playerid][pLider] == 10) { arank = ""LJUB"Hitman"; }
      else if(PlayerInfo[playerid][pLider] == 11) { arank = ""LJUB"BL"; }
      else if(PlayerInfo[playerid][pLider] == 12) { arank = ""LJUB"LCN"; }
      else if(PlayerInfo[playerid][pLider] == 13) { arank = ""LJUB"DNB"; }
      else if(PlayerInfo[playerid][pLider] == 14) { arank = ""LJUB"Taxi"; }
      else if(PlayerInfo[playerid][pLider] == 15) { arank = ""LJUB"Yakuza"; }
      else if(PlayerInfo[playerid][pLider] == 16) { arank = ""LJUB"FBI"; }
      else if(PlayerInfo[playerid][pLider] == 17) { arank = ""LJUB"BCC"; }
      else if(PlayerInfo[playerid][pLider] == 18) { arank = ""LJUB"Vatrogasci"; }
      else if(PlayerInfo[playerid][pLider] == 19) { arank = ""LJUB"DR"; }
      else if(PlayerInfo[playerid][pLider] == 20) { arank = ""LJUB"RM"; }
      else if(PlayerInfo[playerid][pLider] == 21) { arank = ""LJUB"NC"; }
      else if(PlayerInfo[playerid][pLider] == 22) { arank = ""LJUB"LC"; }
      else if(PlayerInfo[playerid][pLider] == 23) { arank = ""LJUB"TBB"; }
      else if(PlayerInfo[playerid][pLider] == 24) { arank = ""LJUB"SAOP"; }
      else if(PlayerInfo[playerid][pLider] == 25) { arank = ""LJUB"VLA"; }
      else if(PlayerInfo[playerid][pVlidera] == 1) { arank = "Vodja Lidera"; }
      else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Head-Admin"; }
      else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Director"; }
      else if(PlayerInfo[playerid][pAdmin] == 7) { arank = "Owner"; }
      else if(PlayerInfo[playerid][pAdmin] == 8) { arank = "Developer"; }
      format(string, sizeof(string), ""GCHAT"[LIDER CHAT] %s [%s | ID:%d"GCHAT"]: "BELA"%s", GetName(playerid), arank, playerid, text);
      Lider(-1,string);
      {
      gLeader[playerid] = GetTimeEx() + 5;
      }
   }
   }
   return 1;
}[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]Vaš odgovor[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): Pawno code problem
[pawn]Posto si definisao lchat kao new lchat[MAX_PLAYERS]; onda stavi ovako
if(lchat[playerid] == 0) return SCM(playerid, -1, ""SRWBOJA"[Monaco OGC] "BELA"/l chat je iskljucen!!");
Sto se tice "Lider" moras napraviti forward koji ce slati poruku.[/pawn]
Poslednja Izmena: Januar 24, 2024, 23:53:45 POSLE PODNE od Wizzard1

Citat: Goku ^ poslato Januar 24, 2024, 22:36:47 POSLE PODNE
Za lchat to ti je ono paljenje/gasenje klk vidim to ti je ne potrebno iz razloga jer prvo moras napraviti da se plali gasi cuvanje toga itd itd pa tek onda ubaciti u komandu jer dzabe sklonimo taj undefined symbol kad nema nikakvu funkciju.

A sto se tice "lider" to je chat koji moras da definises. Ja bi ga nazvao LiderChat da se ne bunis.

forward Lider(color, string[]);
public Lider(color, string[]) { foreach(new i : Player) { if(PlayerInfo[pAdmin] >= 5 || PlayerInfo[pLider] >= 1 || PlayerInfo[pVLidera] >= 1) { { SendClientMessage(i, color, string); } } } }
ako ti izbaci opet error, pošalji mi privatnu poruku, sredićemo.
Poslednja Izmena: Januar 25, 2024, 02:16:20 PRE PODNE od LazzZOne







Citat: cozmic poslato Januar 21, 2024, 14:14:03 POSLE PODNEdebiloper za nju vajnvod je opasan oh ne

Nije poenta da mu sredite, nego da nauci.


Citat: Wizzard1 poslato Januar 25, 2024, 08:34:35 PRE PODNE
Ovakvi nikad nece nauciti...

Čovjek uci dok je ziv. To sto sam početnik u pawnu, ne znaci da necu niti imam volje za ovim da ucim.
Radim rekonstrukciju moda iz 2016-17 kako bih skapirao gdje i kako šta funkcionise, te ubacivanje novih stvari.
I meni kasnije kažu ja lud,retardiran,mangup i ostalo a ono pogledaš LAW organizaciju koja se zove Sheriff Department i u njoj je najveći rank Director umjesto Sheriffa

Citat: X-Skyz poslato Januar 25, 2024, 16:21:12 POSLE PODNE
Čovjek uci dok je ziv. To sto sam početnik u pawnu, ne znaci da necu niti imam volje za ovim da ucim.
Radim rekonstrukciju moda iz 2016-17 kako bih skapirao gdje i kako šta funkcionise, te ubacivanje novih stvari.
https://github.com/openmultiplayer/compiler/blob/master/doc/pawn-lang.pdf prvo ovo procitaj da bi skapirao kako sta funkcionise


Citat: LazzZOne poslato Januar 25, 2024, 02:14:14 PRE PODNE
ako ti izbaci opet error, pošalji mi privatnu poruku, sredićemo.
Evo ga skontao da mu je znanje ravno kurcu, pa sad nece javno da iznosi to, nego u "privatnim porukama"

Citat: ʟᴀᴋᴇʀɪɴɢ poslato Januar 25, 2024, 18:07:29 POSLE PODNE
Evo ga skontao da mu je znanje ravno kurcu, pa sad nece javno da iznosi to, nego u "privatnim porukama"

lmao

Citat: ʟᴀᴋᴇʀɪɴɢ poslato Januar 25, 2024, 18:07:29 POSLE PODNE
Evo ga skontao da mu je znanje ravno kurcu, pa sad nece javno da iznosi to, nego u "privatnim porukama"
hahahaha ti da šutiš







Citat: cozmic poslato Januar 21, 2024, 14:14:03 POSLE PODNEdebiloper za nju vajnvod je opasan oh ne


Citat: Wizzard1 poslato Januar 25, 2024, 23:25:06 POSLE PODNE
uf uf uf uf. opasan opasan. Malo jaci od kisele pavlake.
Burazeru ja sam cuo da kad se on rodio mike tyson otiso u penziju tkd pazi se.

Ovo je za chat
[pawn]LeaderMessage(color, string[]){
   foreach(new i : Player){
      if(PlayerInfo[pLider] != 0 || PlayerInfo[pAdmin] >= 3){
         SendClientMessage(i, color, string);   
      }   
   }
   return 1;
}[/pawn]

Komanda
[pawn]CMD:l(playerid, params[]){
   if(PlayerInfo[playerid][pLider] == 0 || PlayerInfo[playerid][pAdmin] > 3)
      return SendClientMessage(playerid 0x0e6277FF, "ERROR : Niste ovlasteni za upotrebu ove komande");
   if(isnull(params))
      return SendClientMessage(playerid, 0x0e6277FF, "[USAGE] : {FFFFFF}/l [Text]");
   new arank[24], string[240];
   switch(PlayerInfo[playerid][pLider]){
      case 1: arank = "LSPD";   
      case 2: arank = "BDT";// Nastavi   
   }
   switch(PlayerInfo[playerid][pAdmin]){
      case 3: arank = "Admin 3";
      case 4: arank = "Admin 4";
      case 5: arank = "Head Admin";
      case 6: arank = "Direktor";
      case 7: arank = "Owner";
      case 8: arank = "Developer";
   }
   format(string, sizeof(string), "L | {ffffff}%s {0e6277}%s(%d) : {FFFFFF}%s.",arank,GetName(playerid),playerid,  params);
   LeaderMessage(0x0e6277FF, string);
   return 1;
}[/pawn]