Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Radonja Ludi poslato Maj 17, 2021, 03:46:37 PRE PODNE

Naslov: Oko chata
Poruka od: Radonja Ludi poslato Maj 17, 2021, 03:46:37 PRE PODNE
Problem(error/warning): Imam problem ne znam kako da namestim razlicitim vw drugi chat pr ovako ja imam kucu u richmanu i ima neko u vinewood  isti int citamo cat jednom drugome kako da uradim to
.
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Kod:
[pawn]Sta da pratim jer neznam nemam pojma[/pawn]
Naslov: Odg: Oko chata
Poruka od: Neckiy poslato Maj 17, 2021, 06:08:26 PRE PODNE
Sta je pisac hteo da kaze, nista te nisam razumeo...
Naslov: Odg: Oko chata
Poruka od: __vedran.xyz77 poslato Maj 17, 2021, 11:02:41 PRE PODNE
Pošaljite Prox decet ili kako već, dio gdje šalješ poruku
Naslov: Odg: Oko chata
Poruka od: Radonja Ludi poslato Maj 17, 2021, 14:20:16 POSLE PODNE
[pawn]   if (realchat)
   {
       if(gPlayerLogged[playerid] == 0)
       {
           return 0;
         }
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "%s kaze: %s", sendername, text);
      ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
      return 0;
   }
   return 1;
}
[/pawn]
Citat: __vedran.xyz77 poslato Maj 17, 2021, 11:02:41 PRE PODNE
Pošaljite Prox decet ili kako već, dio gdje šalješ poruku
jel ovo
Naslov: Odg: Oko chata
Poruka od: Radonja Ludi poslato Maj 17, 2021, 14:21:36 POSLE PODNE
Citat: Neckiy poslato Maj 17, 2021, 06:08:26 PRE PODNE
Sta je pisac hteo da kaze, nista te nisam razumeo...
Hocu da kazem da u 2 iste kuce sa istim int ako su 2igraca u njima citace jednom drugom chat a nisu u ustoj kucu
Naslov: Odg: Oko chata
Poruka od: __vedran.xyz77 poslato Maj 17, 2021, 17:27:02 POSLE PODNE
Citat: Wakfu poslato Maj 17, 2021, 14:20:16 POSLE PODNE
[pawn]   if (realchat)
   {
       if(gPlayerLogged[playerid] == 0)
       {
           return 0;
         }
      GetPlayerName(playerid, sendername, sizeof(sendername));
      format(string, sizeof(string), "%s kaze: %s", sendername, text);
      ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
      return 0;
   }
   return 1;
}
[/pawn]jel ovo


Ne, posalji stock ProxDector ili public ProxDecector
Naslov: Odg: Oko chata
Poruka od: Radonja Ludi poslato Maj 17, 2021, 22:47:31 POSLE PODNE
[pawn]public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
   new Float:posx, Float:posy, Float:posz;
   new Float:oldposx, Float:oldposy, Float:oldposz;
   new Float:tempposx, Float:tempposy, Float:tempposz;
   GetPlayerPos(playerid, oldposx, oldposy, oldposz);
   for(new i = 0; i <= MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i) == 1)
      {
         {
         GetPlayerPos(i, posx, posy, posz);
         tempposx = (oldposx -posx);
         tempposy = (oldposy -posy);
         tempposz = (oldposz -posz);
         if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
         {
            SCM(i, col1, string);
         }
         else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
         {
            SCM(i, col2, string);
         }
         else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
         {
            SCM(i, col3, string);
         }
         else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
         {
            SCM(i, col4, string);
         }
         else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
         {
            SCM(i, col5, string);
         }
         }
      }
   }
   return 1;
}[/pawn]
Naslov: Odg: Oko chata
Poruka od: Bit Frosty poslato Maj 17, 2021, 23:09:26 POSLE PODNE
Probaj ovako.
[pawn]
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
   new Float:posx, Float:posy, Float:posz;
   new Float:oldposx, Float:oldposy, Float:oldposz;
   new Float:tempposx, Float:tempposy, Float:tempposz;
   new pworld = GetPlayerVirtualWorld(playerid);
   new iworld;

   GetPlayerPos(playerid, oldposx, oldposy, oldposz);
   for(new i = 0; i <= MAX_PLAYERS; i++)
   {
      if(!IsPlayerConnected(i)) continue;
      
      iworld = GetPlayerVirtualWorld(i);
      if(pworld != iworld) continue;

      GetPlayerPos(i, posx, posy, posz);
      tempposx = (oldposx -posx);
      tempposy = (oldposy -posy);
      tempposz = (oldposz -posz);
      if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
      {
         SCM(i, col1, string);
      }
      else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
      {
         SCM(i, col2, string);
      }
      else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
      {
         SCM(i, col3, string);
      }
      else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
      {
         SCM(i, col4, string);
      }
      else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
      {
         SCM(i, col5, string);
      }
      
   }
   return 1;
}
[/pawn]

Ako neko misli da kaze da je kod katastrofa, bice u pravu ali ako mu date link od novije verzije nece znati da je ubaci zato sto su argumenti razliciti.
Naslov: Odg: Oko chata
Poruka od: Radonja Ludi poslato Maj 17, 2021, 23:36:57 POSLE PODNE
Sredio i ubacio drugu verziju  Hvala svima pomogli ste kolko tolko