chat


Započeo Nadroj, Mart 03, 2013, 18:45:45 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Nov sam i ucim tako sto pisem od osnovnih kodova vece kodove i unapredjene.

da li neko moze da mi napise najosnovniji kod za chat i da je distanca 200.0
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak


ÄŒitaj pravila ovog podforuma Ovdje
COMMAND:b(playerid, params[], help)
{
    if(isnull(params)) return SCM(playerid,COLOR_RED," /b [Text]"); // Kucanje komande
    new string[128]; // Oznacis string koji dolje koristimo
    format(string,sizeof(string), "ooc chat | %s:(( %s ))", GetName(playerid), params); // salje poruku
    ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); // Znaci da vidi sam tvoje okruzenje 
    return 1;
}
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

Da znam pravila ovog foruma ali ovde ce biti razne stvari na jednom mestu koje ce mi trebati nece samo ovo biti...
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

uzgred ...

C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(143) : error 017: undefined symbol "b"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(145) : error 017: undefined symbol "isnull"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(145) : error 017: undefined symbol "SCM"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(147) : error 017: undefined symbol "GetName"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(148) : error 017: undefined symbol "ProxDetector"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(151) : warning 225: unreachable code
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(143) : warning 203: symbol is never used: "COMMAND"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

Citat: ladolez poslato Mart 03, 2013, 19:16:55 POSLE PODNE
uzgred ...

C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(143) : error 017: undefined symbol "b"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(145) : error 017: undefined symbol "isnull"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(145) : error 017: undefined symbol "SCM"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(147) : error 017: undefined symbol "GetName"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(148) : error 017: undefined symbol "ProxDetector"
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(151) : warning 225: unreachable code
C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(143) : warning 203: symbol is never used: "COMMAND"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Očito da ne znaš pravila kada radiš DP.
Aha,radiš Gm od 0.

Ovako:

na vrh skroz:


#include <zcmd> // taj include stavi u pawno/include folder


Na vrhu definiraj:

#define SCM SendClientMessage


Dodaj stock i funkciju ovako:

function ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
	if(IsPlayerConnected(playerid))
	{
		new Float:posx, Float:posy, Float:posz;
		new BigEar[MAX_PLAYERS];
		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)))
			{
				if(!BigEar[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);
				}
			}
		}
	}
	return 1;
}

stock GetName(playerid)
{
	new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}

BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

da mod radim od 0 kako bih se vise mucio da naucim nesto... uzgred...

C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(9) : fatal error 100: cannot read from file: "zcmd"

i takodje redovno posecuj ovu temu posto vidim da ces mi trebati i da cu te smarati jos DUGO :)
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

Citat: ladolez poslato Mart 03, 2013, 20:18:19 POSLE PODNE
da mod radim od 0 kako bih se vise mucio da naucim nesto... uzgred...

C:\Users\petarwin7\Desktop\Grand Line\gamemodes\GL.pwn(9) : fatal error 100: cannot read from file: "zcmd"

i takodje redovno posecuj ovu temu posto vidim da ces mi trebati i da cu te smarati jos DUGO :)

Ubaci ZCMD include u datoteku: PAWNO PA U FILDER INCLUDE
Download:

http://www.solidfiles.com/d/879d1213462fc1562d16d464e90c8cf9/
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

Otvori temu po pravilima. Lock.

A ti Flash bi trebao znati pravila.

Last nick: Paradox