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]
Sta je pisac hteo da kaze, nista te nisam razumeo...
Pošaljite Prox decet ili kako već, dio gdje šalješ poruku
[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
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
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
[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]
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.
Sredio i ubacio drugu verziju Hvala svima pomogli ste kolko tolko