Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-02-19, 11:13


Grener







Wiek: 33
Na forum: 5236 dni
Posty: 24

Piwa: 4

Respekt: 50

Witam chodzi mi o to jak zrobi? czat ic. Tz po klikni?ciu [T] piszemy co? i widz? to gracze kt?rzy s? w odleg?o?ci 15 metr?w. Z g?ry dzi?kuje.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 12:50


karol170396







Wiek: 33
Na forum: 5642 dni
Posty: 580
Nick w MP: Journey

Piwa: 1520

Respekt: -126,9

Ostrzeżeń: 100%
U?yj ProxDetectors z innego gamemodu i wklej funkcj? do OnPlayerText :)

Podpis
"MłoteK" napisał/a:


Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a:

Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 13:10


Grener







Wiek: 33
Na forum: 5236 dni
Posty: 24

Piwa: 4

Respekt: 50

Wbi??m w honesta i nic takiego nie mam ,, ProxDetectors"

[ Dodano: 2012-02-19, 13:22 ]
Co? takiego?:
Kod:

public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
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
GetPlayerPos(targetid, 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) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 13:59


karol170396







Wiek: 33
Na forum: 5642 dni
Posty: 580
Nick w MP: Journey

Piwa: 1520

Respekt: -126,9

Ostrzeżeń: 100%
"Grener" napisał/a:

Wbi??m w honesta i nic takiego nie mam ,, ProxDetectors"

[ Dodano: 2012-02-19, 13:22 ]
Co? takiego?:
Kod:

public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
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
GetPlayerPos(targetid, 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) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}


No na przyk?ad, a w honest masz funkcj? o nazwie 'WyswietlTekst' :)

Podpis
"MłoteK" napisał/a:


Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a:

Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 14:26


Grener







Wiek: 33
Na forum: 5236 dni
Posty: 24

Piwa: 4

Respekt: 50

A gdzie to wklei??:
Kod:


public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
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
GetPlayerPos(targetid, 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) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}

Ja zielony jestem.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 14:48


karol170396







Wiek: 33
Na forum: 5642 dni
Posty: 580
Nick w MP: Journey

Piwa: 1520

Respekt: -126,9

Ostrzeżeń: 100%
"Grener" napisał/a:

A gdzie to wklei??:
Kod:


public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
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
GetPlayerPos(targetid, 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) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}

Ja zielony jestem.


Na koniec skryptu/mapy, dodaj jeszcze forward.

Podpis
"MłoteK" napisał/a:


Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a:

Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 15:13


Grener







Wiek: 33
Na forum: 5236 dni
Posty: 24

Piwa: 4

Respekt: 50

Wklei?em i dalej nie dzia?a ;/

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 15:18


karol170396







Wiek: 33
Na forum: 5642 dni
Posty: 580
Nick w MP: Journey

Piwa: 1520

Respekt: -126,9

Ostrzeżeń: 100%
"Grener" napisał/a:

Wklei?em i dalej nie dzia?a ;/


Bo musisz tego u?y? w onplayertext, np. formatem.

Podpis
"MłoteK" napisał/a:


Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a:

Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 15:22


Grener







Wiek: 33
Na forum: 5236 dni
Posty: 24

Piwa: 4

Respekt: 50

Wstawi?em i dalej jest tak jak by?o ;/

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 16:03


karol170396







Wiek: 33
Na forum: 5642 dni
Posty: 580
Nick w MP: Journey

Piwa: 1520

Respekt: -126,9

Ostrzeżeń: 100%
"Grener" napisał/a:

Wstawi?em i dalej jest tak jak by?o ;/


W ten spos?b zrobi?e?? Gash..
Kod:


format(String, sizeof(String),"%s m?wi: %s",NickA(playerid),text);
ProxDetector(10, playerid, String, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);


Podpis
"MłoteK" napisał/a:


Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a:

Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-19, 16:11


Grener







Wiek: 33
Na forum: 5236 dni
Posty: 24

Piwa: 4

Respekt: 50

h?? wklei?em to:
Kod:

public ProxDetectorS(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
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
GetPlayerPos(targetid, 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) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}

na dole mapy doda?em od g?ry
Kod:

forward ProxDetectorS(Float:radi, playerid, targetid);

I tyle ;/ Ja jestem zielony :)

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-20, 21:32


CRX







Wiek: 34
Na forum: 5671 dni
Posty: 114

Piwa: 106

Respekt: 51,6

Ostrzeżeń: 60%
Pawn
public OnPlayerText(playeridtext[])
{
new str[126];
    format(strsizeof(str), "%s m?wi: %s"pName(playerid), text);
         ProxDetector(20.0playeridstr, -1, -1, -1, -1, -1);
return 0;
}

stock pName(playerid)
{
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    return playername;
}

forward ProxDetector(Float:radiplayeridstring[],col1,col2,col3,col4,col5);
stock ProxDetector(Float:radiplayeridstring[], col1col2col3col4col5, echo=0)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posxFloat:posyFloat:posz;
        new Float:oldposxFloat:oldposyFloat:oldposz;
        new Float:tempposxFloat:tempposyFloat:tempposz;
        GetPlayerPos(playeridoldposxoldposyoldposz);
        foreach(Playeri)
        {
            if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
            {
                    if(echo == 0)
                    {
                    GetPlayerPos(iposxposyposz);
                    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(icol1string);
                    else if (((tempposx radi/8) && (tempposx > -radi/8)) && ((tempposy radi/8) && (tempposy > -radi/8)) && ((tempposz radi/8) && (tempposz > -radi/8)))
                        SendClientMessage(icol2string);
                    else if (((tempposx radi/4) && (tempposx > -radi/4)) && ((tempposy radi/4) && (tempposy > -radi/4)) && ((tempposz radi/4) && (tempposz > -radi/4)))
                        SendClientMessage(icol3string);
                    else if (((tempposx radi/2) && (tempposx > -radi/2)) && ((tempposy radi/2) && (tempposy > -radi/2)) && ((tempposz radi/2) && (tempposz > -radi/2)))
                        SendClientMessage(icol4string);
                    else if (((tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
                        SendClientMessage(icol5string);

                }
                    else if(echo == 1)
                {
                    if(!= playerid)
                    {
                        GetPlayerPos(iposxposyposz);
                        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(icol1string);
                        else if (((tempposx radi/8) && (tempposx > -radi/8)) && ((tempposy radi/8) && (tempposy > -radi/8)) && ((tempposz radi/8) && (tempposz > -radi/8)))
                            SendClientMessage(icol2string);
                        else if (((tempposx radi/4) && (tempposx > -radi/4)) && ((tempposy radi/4) && (tempposy > -radi/4)) && ((tempposz radi/4) && (tempposz > -radi/4)))
                            SendClientMessage(icol3string);
                        else if (((tempposx radi/2) && (tempposx > -radi/2)) && ((tempposy radi/2) && (tempposy > -radi/2)) && ((tempposz radi/2) && (tempposz > -radi/2)))
                            SendClientMessage(icol4string);
                        else if (((tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
                            SendClientMessage(icol5string);
                    }
                }
            }
        }
    }
    return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-23, 15:59


Grener







Wiek: 33
Na forum: 5236 dni
Posty: 24

Piwa: 4

Respekt: 50

A wstawi mi to kto? do gamemode? BO ja mam b??dy moje gg: cut

[ Komentarz dodany przez: Mattwell: 2012-02-23, 19:26 ]
Pomagamy na forum.

Podpis
Ostatnio zmieniony przez MG303 2012-02-23, 19:26, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Tagi: jak :: zrobić :: czat
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [GF] Jak zrobić czat IC Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku