Wysłany: 2012-09-14, 16:34
Jablecznik
;*
Wiek: 26 Na forum: 5291 dni Posty: 43
Nick w MP: Emilio Cavallaro
Piwa : 138
Witam. Robie server rp i nie wiem jak zrobi? /do i /me oraz, ze jak sie mowi obok siebie to slychac, a nie w calej grze jak jest na dm. Polewam piwo! Teraz chyba dobry dzial. Umiem robic duzo rzeczy ale akurat tego nie xd
Wysłany: 2012-09-14, 20:23
Combacior
Wiek: 29 Na forum: 5796 dni Posty: 1516
Piwa : 2161
Pobierasz pozycj? gracza u?ywaj?cego komend?, robisz p?tle i w niej sprawdzasz czy gracz jest w promieniu tyle metr?w, ile wpiszesz, np.
Kod: new pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
for(new i; i < 200; i++)
{
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 50.0, pos[0], pos[1], pos[2]))
{
SendClientMessage(i, -1, "Tekst");
return 1;
}
}
Wklejasz to do komendy
Wysłany: 2012-09-14, 21:17
Jablecznik
;*
Wiek: 26 Na forum: 5291 dni Posty: 43
Nick w MP: Emilio Cavallaro
Piwa : 138
"CombaT" napisał/a :Pobierasz pozycj? gracza u?ywaj?cego komend?, robisz p?tle i w niej sprawdzasz czy gracz jest w promieniu tyle metr?w, ile wpiszesz, np.
Kod: new pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
for(new i; i < 200; i++)
{
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 50.0, pos[0], pos[1], pos[2]))
{
SendClientMessage(i, -1, "Tekst");
return 1;
}
}
Wklejasz to do komendy
Do jakiej komendy?! Wez wytlumacz po ludzku bo nic nie rozumiem.
Wysłany: 2012-09-14, 21:34
Combacior
Wiek: 29 Na forum: 5796 dni Posty: 1516
Piwa : 2161
"Jablecznik" napisał/a :Do jakiej komendy?! Wez wytlumacz po ludzku bo nic nie rozumiem.
Do swojej komendy i nie tym tonem ch?opczyku, ciesz si? ?e w og?le masz jak?kolwiek pomoc. Robisz komend?, tak? Sk?d mam wiedzie? jaki masz system komend, po drugie nie wiem o co chodzi w tych komendach.
Wyt?umaczone jest po ludzku, tylko trzeba najpierw przeczyta? cholerne poradniki do pawno, p??niej rozumienie.
Wysłany: 2012-09-14, 21:37
Bielo99
Wiek: 27 Na forum: 5395 dni Posty: 15
Nick w MP: Bielo
Piwa : 5
?apaj
Kod: if (strcmp(cmd, "/me", true)==0){
strmid(mpt,cmdtext,3,strlen(cmdtext));
if(!strlen(mpt)) {
SendClientMessage(playerid, COLOR_YELLOW, "- U?yj: /me [czynno??]");
return 1;
}
format(string, sizeof(string), "%s%s",PlayerName(playerid), mpt);
ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
return 1;
}
I
Kod: if (strcmp(cmd, "/do", true)==0){
strmid(mpt,cmdtext,3,strlen(cmdtext));
if(!strlen(mpt)) {
SendClientMessage(playerid, COLOR_YELLOW, "- U?yj: /do [tekst]");
return 1;
}
format(string, sizeof(string), "%s m?wi:%s",PlayerName(playerid), mpt);
ProxDetector(30.0, playerid, string, COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
return 1;
}
Wysłany: 2012-09-14, 22:15
Jablecznik
;*
Wiek: 26 Na forum: 5291 dni Posty: 43
Nick w MP: Emilio Cavallaro
Piwa : 138
"Bielo99" napisał/a :?apaj
Kod: if (strcmp(cmd, "/me", true)==0){
strmid(mpt,cmdtext,3,strlen(cmdtext));
if(!strlen(mpt)) {
SendClientMessage(playerid, COLOR_YELLOW, "- U?yj: /me [czynno??]");
return 1;
}
format(string, sizeof(string), "%s%s",PlayerName(playerid), mpt);
ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
return 1;
}
I
Kod: if (strcmp(cmd, "/do", true)==0){
strmid(mpt,cmdtext,3,strlen(cmdtext));
if(!strlen(mpt)) {
SendClientMessage(playerid, COLOR_YELLOW, "- U?yj: /do [tekst]");
return 1;
}
format(string, sizeof(string), "%s m?wi:%s",PlayerName(playerid), mpt);
ProxDetector(30.0, playerid, string, COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
return 1;
}
super ale 4 errory
Kod: C:\Users\Mama\Desktop\Server\gamemodes\grandlarc.pwn(128) : error 017: undefined symbol "mpt"
C:\Users\Mama\Desktop\Server\gamemodes\grandlarc.pwn(129) : error 017: undefined symbol "mpt"
C:\Users\Mama\Desktop\Server\gamemodes\grandlarc.pwn(133) : error 017: undefined symbol "PlayerName"
C:\Users\Mama\Desktop\Server\gamemodes\grandlarc.pwn(134) : error 017: undefined symbol "ProxDetector"
128
Kod: strmid(mpt,cmdtext,3,strlen(cmdtext));
129
Kod:
133
Kod: format(string, sizeof(string), "%s%s",PlayerName(playerid), mpt);
134
Kod: ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
Wysłany: 2012-09-14, 23:11
DMN
Wiek: 33 Na forum: 5015 dni Posty: 15
Piwa : 17
Pobierz jak?? map? RP i tam masz wszystkie takie pierdo?y. Skopiuj, por?wnaj.. Jak gra?e? na RP to wiesz jak to dzia?a wi?c metod? pr?b i b??d?w sam do tego dojdziesz. Powodzenia!
Wysłany: 2012-09-14, 23:16
Bartek23071993
WiceWersa
Wiek: 29 Na forum: 5223 dni Posty: 250
Nick w MP: WiceWersa
Piwa : 2429
To si? przyda w rozwi?zaniu b??du. Z reszt? sobie na pewno poradzisz.
Pawn forward ProxDetector ( Float : radi , playerid , str [], col1 , col2 , col3 , col4 , col5 );
public ProxDetector ( Float : radi , playerid , str [], 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 ))
{
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 , str );
}
else if ((( tempposx < radi / 8 ) && ( tempposx > - radi / 8 )) && (( tempposy < radi / 8 ) && ( tempposy > - radi / 8 )) && (( tempposz < radi / 8 ) && ( tempposz > - radi / 8 )))
{
SendClientMessage ( i , col2 , str );
}
else if ((( tempposx < radi / 4 ) && ( tempposx > - radi / 4 )) && (( tempposy < radi / 4 ) && ( tempposy > - radi / 4 )) && (( tempposz < radi / 4 ) && ( tempposz > - radi / 4 )))
{
SendClientMessage ( i , col3 , str );
}
else if ((( tempposx < radi / 2 ) && ( tempposx > - radi / 2 )) && (( tempposy < radi / 2 ) && ( tempposy > - radi / 2 )) && (( tempposz < radi / 2 ) && ( tempposz > - radi / 2 )))
{
SendClientMessage ( i , col4 , str );
}
else if ((( tempposx < radi ) && ( tempposx > - radi )) && (( tempposy < radi ) && ( tempposy > - radi )) && (( tempposz < radi ) && ( tempposz > - radi )))
{
SendClientMessage ( i , col5 , str );
}
}
}
}
return 1 ;
}
Tagi: /me :: oraz :: mowienie :: obok :: siebie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: