Skripta koju koristim: Mod od 0.
Detaljan opis problema: Ovako, sve mi je radilo dobro, kad odjednom uđem u igricu, sve sam pokrenuo, server itd, uđem u igricu, sve komande hoće, ali mi neće CHAT. Chat: Kao ono na Stunt/DM - Svi vide. Molim vas pomozite!
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
Zaključano
[POMOC] Chat
1,127
pregleda
10
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
pre 14 godina
Napravis nesto kao ProxDetector (jednostavnije i bolje) i onda tu u onplayertext dodas:
new
string,
sendername;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "IC ~ %s ~ %s ", sendername, text);
ProxDetector(30, playerid, string, 0xFFFFFFFF, 0xEFEFEFFF, 0xDFDFDFFF, 0xCFCFCFFF, 0xBFBFBFFF);//naprimer ako budes radio sa prox detectorom
NPR pogledaj ovo:
new
string,
sendername;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "IC ~ %s ~ %s ", sendername, text);
ProxDetector(30, playerid, string, 0xFFFFFFFF, 0xEFEFEFFF, 0xDFDFDFFF, 0xCFCFCFFF, 0xBFBFBFFF);//naprimer ako budes radio sa prox detectorom
NPR pogledaj ovo:
Quote from April 13, 2011, 6:20 pm:
Evo nesto kao /me komanda
Prvo morate imati ovo:
A zatim ovo:
Evo jedan primjer:
PlayerDoing(playerid,"ulazi u vozilo."); //To npr dodate u OnPlayerEnterVehicle
i u igri ce pisati ovako:
*Netko_Netkic ulazi u vozilo.
Nece naravno pisati netko netkic vec ime koje taj igrac koristi... Kul, ha?
Prvo morate imati ovo:
stock SendClientMessageInRangeOfPoint(str[],boja,radius,Float:x,Float:y,Float:z)
{
//by BloodMaster
new players = GetMaxPlayers();
for(new i=0; i {
if(IsPlayerInRangeOfPoint(i,radius,x,y,z) SendClientMessage(i,boja,str);
}
return 1;
} A zatim ovo:
stock PlayerDoing(playerid,text[]/*Pusa eXtreme*/)
{
//by BloodMaster
if(!IsPlayerConnected(playerid)) return 1;
new ime,string,Float:x,Float:y,Float:z;
GetPlayerName(playerid,ime,20);
format(string,sizeof string,"* %s %s",ime,text);
GetPlayerPos(playerid,x,y,z);
SendClientMessageInRangeOfPoint(string,C623CF,15,x,y,z);
return 1;
}Evo jedan primjer:
PlayerDoing(playerid,"ulazi u vozilo."); //To npr dodate u OnPlayerEnterVehicle
i u igri ce pisati ovako:
*Netko_Netkic ulazi u vozilo.
Nece naravno pisati netko netkic vec ime koje taj igrac koristi... Kul, ha?
pre 14 godina
Mislis na lokalan chat ? To bi mogao uradit sa ProxDetectorom ili IfIsPlayerInRangeOfPoint..
Evo ti ProxDetector
Prvo ga najavi gore iznad Main ..
forward ProxDetector(Float:radi,playerid,string[],col1,col2,col3,col4,col5);
A ovo dodaj ispod OnPlayerText(playerid,text[])
Evo ti ProxDetector
Prvo ga najavi gore iznad Main ..
forward ProxDetector(Float:radi,playerid,string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],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) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(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);
}
}
}
}
A ovo dodaj ispod OnPlayerText(playerid,text[])
new pname, str;
GetPlayerName(playerid, pname, 24);
format(str, sizeof(str), "%s zboruva: %s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
pre 14 godina
#InphiniteGamer wrote on May 16, 2011, 3:16 pm:
Mislis na lokalan chat ? To bi mogao uradit sa ProxDetectorom ili IfIsPlayerInRangeOfPoint..
Evo ti ProxDetector
Prvo ga najavi gore iznad Main ..
forward ProxDetector(Float:radi,playerid,string[],col1,col2,col3,col4,col5);
A ovo dodaj ispod OnPlayerText(playerid,text[])
Evo ti ProxDetector
Prvo ga najavi gore iznad Main ..
forward ProxDetector(Float:radi,playerid,string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],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) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(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);
}
}
}
}
A ovo dodaj ispod OnPlayerText(playerid,text[])
new pname, str;
GetPlayerName(playerid, pname, 24);
format(str, sizeof(str), "%s zboruva: %s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
Nema potrebe da ponovis isto...
Kao ono na Stunt/DM - Svi vide
Ima return 0; a treba biti return 1; ili return true;
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava