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

Wysłany: 2012-09-14, 16:34


Jablecznik

;*






Wiek: 26
Na forum: 5291 dni
Posty: 43
Nick w MP: Emilio Cavallaro

Piwa: 138

Respekt: 50

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! :P Teraz chyba dobry dzial. Umiem robic duzo rzeczy ale akurat tego nie xd

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-14, 20:23


Combacior







Wiek: 29
Na forum: 5796 dni
Posty: 1516

Piwa: 2161

Respekt: 1060
Respekt: 1060

Ostrzeżeń: 20%
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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-14, 21:17


Jablecznik

;*






Wiek: 26
Na forum: 5291 dni
Posty: 43
Nick w MP: Emilio Cavallaro

Piwa: 138

Respekt: 50

"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.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-14, 21:34


Combacior







Wiek: 29
Na forum: 5796 dni
Posty: 1516

Piwa: 2161

Respekt: 1060
Respekt: 1060

Ostrzeżeń: 20%
"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.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-14, 21:37


Bielo99







Wiek: 27
Na forum: 5395 dni
Posty: 15
Nick w MP: Bielo

Piwa: 5

Respekt: 50

?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;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-14, 22:15


Jablecznik

;*






Wiek: 26
Na forum: 5291 dni
Posty: 43
Nick w MP: Emilio Cavallaro

Piwa: 138

Respekt: 50

"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:

if(!strlen(mpt)) {

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);


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-14, 23:11


DMN







Wiek: 33
Na forum: 5015 dni
Posty: 15

Piwa: 17

Respekt: 45,3

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!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-14, 23:16


Bartek23071993

WiceWersa






Wiek: 29
Na forum: 5223 dni
Posty: 250
Nick w MP: WiceWersa

Piwa: 2429

Respekt: 70

Ostrzeżeń: 20%
To si? przyda w rozwi?zaniu b??du. Z reszt? sobie na pewno poradzisz.

Pawn
forward ProxDetector(Float:radiplayeridstr[], col1col2col3col4col5);
public ProxDetector(Float:radiplayeridstr[], col1col2col3col4col5)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posxFloat:posyFloat:posz;
        new Float:oldposxFloat:oldposyFloat:oldposz;
        new Float:tempposxFloat:tempposyFloat:tempposz;
        GetPlayerPos(playeridoldposxoldposyoldposz);

        for(new 0MAX_PLAYERSi++)
        {
            if(IsPlayerConnected(i))
            {
                GetPlayerPos(iposxposyposz);
                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(icol1str);
                }
                else if (((tempposx radi/8) && (tempposx > -radi/8)) && ((tempposy radi/8) && (tempposy > -radi/8)) && ((tempposz radi/8) && (tempposz > -radi/8)))
                {
                 SendClientMessage(icol2str);
                }
                else if (((tempposx radi/4) && (tempposx > -radi/4)) && ((tempposy radi/4) && (tempposy > -radi/4)) && ((tempposz radi/4) && (tempposz > -radi/4)))
                {
                 SendClientMessage(icol3str);
                }
                else if (((tempposx radi/2) && (tempposx > -radi/2)) && ((tempposy radi/2) && (tempposy > -radi/2)) && ((tempposz radi/2) && (tempposz > -radi/2)))
                {
                 SendClientMessage(icol4str);
                }
                else if (((tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
                {
                 SendClientMessage(icol5str);
                }
            }
        }
    }
    return 1;
}


Postaw piwo autorowi tego posta
 

 
Tagi: /me :: oraz :: mowienie :: obok :: siebie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN 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