Pretraga

Pritisnite Enter za pretragu ili Escape za zatvaranje

Zaključano

[POMOC] Chat

Započeo MaX91
pre 14 godina
1,127
pregleda
10
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
CH|Rile
Made Man
pre 14 godina
Skripta koju koristim: Mod od 0.
Detaljan opis problema: Ovako, sve mi je radilo dobro, kad odjednom uđem u igricu, sve sam pokrenuo, server itd, uđem u igricu, sve komande hoće, ali mi neće CHAT. Chat: Kao ono na Stunt/DM - Svi vide. Molim vas pomozite!
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
pavle.bakun
Crime Lord
pre 14 godina
Objasni malo vise, daj nam OnPlayerText
CH|Rile
Made Man
pre 14 godina
Prazno mi je OnPlayerText, tj:
public OnPlayerText(playerid, text[])
{
    return 0;
}

Šta misliš sad?
pavle.bakun
Crime Lord
pre 14 godina
Napravis nesto kao ProxDetector (jednostavnije i bolje) i onda tu u onplayertext dodas:

   new
   string,
   sendername;
   GetPlayerName(playerid, sendername, sizeof(sendername));
   format(string, sizeof(string), "IC ~ %s ~ %s ", sendername, text);
   ProxDetector(30, playerid, string, 0xFFFFFFFF, 0xEFEFEFFF, 0xDFDFDFFF, 0xCFCFCFFF, 0xBFBFBFFF);//naprimer ako budes radio sa prox detectorom



NPR pogledaj ovo:
Quote from April 13, 2011, 6:20 pm:
Evo nesto kao /me komanda

Prvo morate imati ovo:
stock SendClientMessageInRangeOfPoint(str[],boja,radius,Float:x,Float:y,Float:z)
{
//by BloodMaster
new players = GetMaxPlayers();
for(new i=0; i {
if(IsPlayerInRangeOfPoint(i,radius,x,y,z) SendClientMessage(i,boja,str);
}
return 1;
}


A zatim ovo:
stock PlayerDoing(playerid,text[]/*Pusa eXtreme*/)
{
//by BloodMaster
if(!IsPlayerConnected(playerid)) return 1;
new ime,string,Float:x,Float:y,Float:z;
GetPlayerName(playerid,ime,20);
format(string,sizeof string,"* %s %s",ime,text);
GetPlayerPos(playerid,x,y,z);
SendClientMessageInRangeOfPoint(string,C623CF,15,x,y,z);
return 1;
}


Evo jedan primjer:

PlayerDoing(playerid,"ulazi u vozilo.");  //To npr dodate u OnPlayerEnterVehicle

i u igri ce pisati ovako:

*Netko_Netkic ulazi u vozilo.

Nece naravno pisati netko netkic vec ime koje taj igrac koristi... Kul, ha?
CH|Rile
Made Man
pre 14 godina
Ne, ja neću za IC chat, nisi me shvatio, ja hoću za običan chat.
Sada ću to da isprobam.
EDIT: Ne pomaže ni to.
pavle.bakun
Crime Lord
pre 14 godina
public OnPlayerText(playerid, text[])
{
    return 1;
}
#InphiniteGamer
Rookie
pre 14 godina
Mislis  na lokalan chat ? To bi mogao uradit sa ProxDetectorom ili IfIsPlayerInRangeOfPoint..

Evo ti ProxDetector 

Prvo ga najavi gore iznad Main ..

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

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);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
            {
                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)))
                {
                    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);
            }
        }
}
}



A ovo dodaj ispod  OnPlayerText(playerid,text[])

    new pname, str;
    GetPlayerName(playerid, pname, 24);
    format(str, sizeof(str), "%s zboruva: %s", pname, text);
    ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);

pavle.bakun
Crime Lord
pre 14 godina
#InphiniteGamer wrote on May 16, 2011, 3:16 pm:
Mislis  na lokalan chat ? To bi mogao uradit sa ProxDetectorom ili IfIsPlayerInRangeOfPoint..

Evo ti ProxDetector 

Prvo ga najavi gore iznad Main ..

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

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);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
            {
                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)))
                {
                    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);
            }
        }
}
}



A ovo dodaj ispod  OnPlayerText(playerid,text[])

     new pname, str;
    GetPlayerName(playerid, pname, 24);
    format(str, sizeof(str), "%s zboruva: %s", pname, text);
    ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);


Nema potrebe da ponovis isto...
Kao ono na Stunt/DM - Svi vide
Ima return 0; a treba biti return 1; ili return true;
CH|Rile
Made Man
pre 14 godina
Hvala ti Extreme kralju. 😉
Može LOCK.
pavle.bakun
Crime Lord
pre 14 godina
Reddy wrote on May 16, 2011, 3:20 pm:
Hvala ti Extreme kralju. 😉
Može LOCK.

Na Nebu i zemlji vlada Bog, na ovom forumu Correlli(sad ja nastavljam) a na ovom PDF ja xD


Nema problema, pitaj ukoliko jos nesto nije jasno!

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava