[POMOC]

Započeo Obrisan korisnik
22. Feb. 2012. Zaključano
832
pregleda
13
postova
Deleted User
Obrisan korisnik
22. Feb. 2012.
Skripta koju koristim:Mod od 0
Detaljan opis problema:Radimo mod od 0.I sada izgleda mod kao DM chat,i kako sada napraviti da samo u blizini vide poruke,a ne svi na serv.
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
^KinGstoN^
4
Shot Caller
22. Feb. 2012.
Kod dela gde se pojavljuje text ('nick' kaze 'text'), stavi ispod te linije ovo

ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);


Mislim da bi to trebalo da radi.. i jos nesto, ako nemas definirano COLOR_FADE1, COLOR_FADE2, COLOR_FADE 3, COLOR_FADE4 i COLOR_FADE5, stavi boje koje ti imas definirane ili stavi hex code te boje koje oces (0xFF...)

Valjda radi. Ako ne, reci. Nisam bas najbolji
GGC
5
Godfather
22. Feb. 2012.
Stavis proxdetector i returnas na 0.
Deleted User
Obrisan korisnik
22. Feb. 2012.
Evo ovako je u mene
{
  if (realchat)
{
    if(gPlayerLogged == 0)
    {
        return 0;
      }
      new string;
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;
}
^KinGstoN^
4
Shot Caller
22. Feb. 2012.
Pa trebalo bi raditi.. jesi testao?
Deleted User
Obrisan korisnik
22. Feb. 2012.
Da ali nece da radi...
^KinGstoN^
4
Shot Caller
22. Feb. 2012.
Uzmi iz nekog gm chat... evo ti npr ovo:


if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/say", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Niste se prijavili!");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext <= ' '))
{
idx++;
}
new offset = idx;
new result;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext;
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /local [local chat]");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo == 1)
{
format(string, sizeof(string), "Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
    {
    format(string, sizeof(string), "%s kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
    new carid = GetPlayerVehicleID(playerid);
    if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsADjubretar(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424)
    {
        if(PlayerInfo == 1)
{
format(string, sizeof(string), "Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "%s kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
    }
    else
    {
    if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
    {
    if(PlayerInfo == 1)
{
format(string, sizeof(string), "(Zatvoren prozor) Stranac kaze: %s", result);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "(Zatvoren prozor) %s kaze: %s", sendername, result);
    ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
    if(PlayerInfo == 1)
{
format(string, sizeof(string), "(Otvoren prozor) Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "(Otvoren prozor) %s kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
}
}
printf("%s", string);
}
return 1;
}
Luis
5
Godfather
22. Feb. 2012.
Jednostano Pod OnPlayerText napravis kako zelis da ti prikazuje  i stavis ProxDetector ....
Deleted User
Obrisan korisnik
22. Feb. 2012.
Quote from February 22, 2012, 10:47 pm:
Jednostano Pod OnPlayerText napravis kako zelis da ti prikazuje  i stavis ProxDetector ....

Pa evo vidi kako je u mene
{
  if (realchat)
{
    if(gPlayerLogged == 0)
    {
        return 0;
      }
      new string;
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;
}

Tako sve stavim ali nece.
Frank99
4
Enforcer
23. Feb. 2012.
Probaj sad. 😄

Dodao sam ChatBubble, kod mene je tako i radi.
	if (realchat)
{
    if(gPlayerLogged == 0)
    {
        return 0;
      }
              new string;
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);
                SetPlayerChatBubble(playerid, text,COLOR_WHITE,50.0,5000);
return 0;
}
return 1;
}
Deleted User
Obrisan korisnik
23. Feb. 2012.
Frank. wrote on February 23, 2012, 5:42 am:
Probaj sad. 😄

Dodao sam ChatBubble, kod mene je tako i radi.
	if (realchat)
{
    if(gPlayerLogged == 0)
    {
        return 0;
      }
              new string;
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);
                SetPlayerChatBubble(playerid, text,COLOR_WHITE,50.0,5000);
return 0;
}
return 1;
}

Neradi ni to. :@ Daj nek netko pomaze ovo mi treba -.-"
Frank99
4
Enforcer
23. Feb. 2012.
Et' sad ću ti napisati sve što se kod mene nalazi za to.

Idemo:

Pod newovi dodaj:
new realchat = 1;


Onda pod 'public OnPlayerText' dodaj:
	SetPlayerChatBubble(playerid, text, 0x0091FFFF, 100.0, 10000);
if(stringContainsIP(text))


Onda pod forwardovi:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);


Onda za svaki slučaj stavi, možda ti ovo omogućava nešto, nisam siguran:

public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
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);
//radi = 2.0; //Trigger Radius
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(!BigEar)
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
}//not connected
return 1;
}
Deleted User
Obrisan korisnik
23. Feb. 2012.
Frank. wrote on February 23, 2012, 5:45 pm:
Et' sad ću ti napisati sve što se kod mene nalazi za to.

Idemo:

Pod newovi dodaj:
new realchat = 1;


Onda pod 'public OnPlayerText' dodaj:
	SetPlayerChatBubble(playerid, text, 0x0091FFFF, 100.0, 10000);
if(stringContainsIP(text))


Onda pod forwardovi:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);


Onda za svaki slučaj stavi, možda ti ovo omogućava nešto, nisam siguran:

public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
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);
//radi = 2.0; //Trigger Radius
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(!BigEar)
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
}//not connected
return 1;
}

Neradi ...

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha