Wysłany: 2012-02-19, 11:13
Grener
Wiek: 33 Na forum: 5236 dni Posty: 24
Piwa : 4
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.
Wysłany: 2012-02-19, 12:50
karol170396
Wiek: 33 Na forum: 5642 dni Posty: 580
Nick w MP: Journey
Piwa : 1520
Wysłany: 2012-02-19, 13:10
Grener
Wiek: 33 Na forum: 5236 dni Posty: 24
Piwa : 4
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;
}
Wysłany: 2012-02-19, 13:59
karol170396
Wiek: 33 Na forum: 5642 dni Posty: 580
Nick w MP: Journey
Piwa : 1520
"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.
Wysłany: 2012-02-19, 14:26
Grener
Wiek: 33 Na forum: 5236 dni Posty: 24
Piwa : 4
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.
Wysłany: 2012-02-19, 14:48
karol170396
Wiek: 33 Na forum: 5642 dni Posty: 580
Nick w MP: Journey
Piwa : 1520
"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.
Wysłany: 2012-02-19, 15:13
Grener
Wiek: 33 Na forum: 5236 dni Posty: 24
Piwa : 4
Wklei?em i dalej nie dzia?a ;/
Wysłany: 2012-02-19, 15:18
karol170396
Wiek: 33 Na forum: 5642 dni Posty: 580
Nick w MP: Journey
Piwa : 1520
Wysłany: 2012-02-19, 15:22
Grener
Wiek: 33 Na forum: 5236 dni Posty: 24
Piwa : 4
Wstawi?em i dalej jest tak jak by?o ;/
Wysłany: 2012-02-19, 16:03
karol170396
Wiek: 33 Na forum: 5642 dni Posty: 580
Nick w MP: Journey
Piwa : 1520
"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.
Wysłany: 2012-02-19, 16:11
Grener
Wiek: 33 Na forum: 5236 dni Posty: 24
Piwa : 4
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
Wysłany: 2012-02-20, 21:32
CRX
Wiek: 34 Na forum: 5671 dni Posty: 114
Piwa : 106
Pawn public OnPlayerText ( playerid , text [])
{
new str [ 126 ];
format ( str , sizeof ( str ), "%s m?wi: %s" , pName ( playerid ), text );
ProxDetector ( 20.0 , playerid , str , - 1 , - 1 , - 1 , - 1 , - 1 );
return 0 ;
}
stock pName ( playerid )
{
new playername [ MAX_PLAYER_NAME ];
GetPlayerName ( playerid , playername , MAX_PLAYER_NAME );
return playername ;
}
forward ProxDetector ( Float : radi , playerid , string [], col1 , col2 , col3 , col4 , col5 );
stock ProxDetector ( Float : radi , playerid , string [], col1 , col2 , col3 , col4 , col5 , echo= 0 )
{
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 );
foreach( Player , i )
{
if( GetPlayerVirtualWorld ( playerid ) == GetPlayerVirtualWorld ( i ))
{
if(echo == 0 )
{
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 if(echo == 1 )
{
if( i != playerid )
{
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 );
}
}
}
}
}
return 1 ;
}
Wysłany: 2012-02-23, 15:59
Grener
Wiek: 33 Na forum: 5236 dni Posty: 24
Piwa : 4
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.
Ostatnio zmieniony przez MG303 2012-02-23, 19:26, w całości zmieniany 1 raz
Tagi: jak :: zrobić :: czat
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: