Započeo Denis_Lapi
•12. Jan. 2014.• Zaključano[POMOC] Kako iskljuciti default SA:MP chat
1,166
pregleda
12
postova
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,660
Postovi:
86
Teme:
Pridružio se:Avg. 2012
12. Jan. 2014.
Skripta koju koristim: Moja skripta
Detaljan opis problema:Zanima me na koji nacin mogu da iskljucim onaj default SA:MP chat (onaj narandzasti koji je ubacen kad se skine PAWNO paket) i naravno kako da napravim neki svoj, kao i na svakom drugom serveru da vise samo igraci koji su u mojoj blizini tj. blizini igraca..Primer:
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Detaljan opis problema:Zanima me na koji nacin mogu da iskljucim onaj default SA:MP chat (onaj narandzasti koji je ubacen kad se skine PAWNO paket) i naravno kako da napravim neki svoj, kao i na svakom drugom serveru da vise samo igraci koji su u mojoj blizini tj. blizini igraca..Primer:
Denis_Lapi kaze: Kako da napravi chat Tako nesto bih hteo, mislim da razumete sta hocu, znaci klasican chatDio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno):
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
23 / 250 XP
Početnik(2)
3,748
Postovi:
73
Teme:
Pridružio se:Jan. 2012
12. Jan. 2014.
ovo pod onplayertext
new string;
format(string, sizeof(string), "%s kaze: %s", GetName(playerid), text);
ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,660
Postovi:
86
Teme:
Pridružio se:Avg. 2012
13. Jan. 2014.
: error 017: undefined symbol "GetName"
: error 017: undefined symbol "ProxDetector"Baca error, do sada nisam koristio ProxDetector
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosAktivan Član
23 / 250 XP
Početnik(2)
3,748
Postovi:
73
Teme:
Pridružio se:Jan. 2012
13. Jan. 2014.
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))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
{
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;
}stock GetName(playerid)
{
new name;
GetPlayerName(playerid, name, sizeof(name));
return name;
}Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
666
Postovi:
43
Teme:
Pridružio se:Avg. 2012
13. Jan. 2014.
stock ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
new Float:posx, Float:posy, Float:posz, Float:oldposx, Float:oldposy, Float:oldposz, Float:tempposx, Float:tempposy, Float:tempposz, invehicle, virtualworld = GetPlayerVirtualWorld(playerid), interior = GetPlayerInterior(playerid), vehicleid = GetPlayerVehicleID(playerid), ivehicleid;
if(vehicleid) { GetVehiclePos(vehicleid,oldposx,oldposy,oldposz); }
else
{
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
vehicleid = GetPlayerVehicleID(playerid);
}
foreach(Player, i) {
if(GetPlayerVirtualWorld(i) == virtualworld) {
if((GetPlayerInterior(i) == interior)) {
if(vehicleid) {
if(IsPlayerInVehicle(i,vehicleid)) invehicle = 1; }
if(!invehicle) {
if(IsPlayerInAnyVehicle(i)) {
ivehicleid = GetPlayerVehicleID(i);
GetVehiclePos(ivehicleid,posx,posy,posz); }
else {
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))) SCM(i, col1, string);
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) SCM(i, col2, string);
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) SCM(i, col3, string);
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) SCM(i, col4, string);
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) SCM(i, col5, string);
}
else SCM(i, col1, string);
}
}
}
return 1;
}stock RPname(playerid)
{
new Name[ MAX_PLAYER_NAME ], i = -1;
GetPlayerName( playerid, Name, MAX_PLAYER_NAME );
while( Name[ ++i ] )
if( Name[ i ] == '_' )
Name[ i ] = ' ';
return Name;
}Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,660
Postovi:
86
Teme:
Pridružio se:Avg. 2012
13. Jan. 2014.
Baca mi neki warning-e, mislim nije to nista strasno, ali kad vec radim mod od 0 bilo bi lepo da ih nema
Uzgred, jel moze neko da mi objasni za sta sluzi ProxDetector, onako malo detaljnije
Imam problem, sad sam video...
http://postimg.org/image/5x3vn1oc9/
C:\Users\Novica\Desktop\Mod 0\gamemodes\MojMod.pwn(2562) : warning 202: number of arguments does not match definition
C:\Users\Novica\Desktop\Mod 0\gamemodes\MojMod.pwn(2562) : warning 202: number of arguments does not match definition
C:\Users\Novica\Desktop\Mod 0\gamemodes\MojMod.pwn(2565) : warning 217: loose indentationUzgred, jel moze neko da mi objasni za sta sluzi ProxDetector, onako malo detaljnije
Imam problem, sad sam video...
http://postimg.org/image/5x3vn1oc9/
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
666
Postovi:
43
Teme:
Pridružio se:Avg. 2012
13. Jan. 2014.
Pa salje poruku u 5 razlicitih boja zavisno od udaljenosti.
Pogledaj malo funkciju pa ces skontat,valjda 😄
btw warning 202: ne poklapa ti se broj parametara sa prototipom, npr SetPlayerInterior(playerid, 13, 245); // ovde ti 245 ne treba itd.
warning 217: neporavnane linije, gubis identaciju i compiler ne moze da prepozna kod ali nista strasno
Pogledaj malo funkciju pa ces skontat,valjda 😄
btw warning 202: ne poklapa ti se broj parametara sa prototipom, npr SetPlayerInterior(playerid, 13, 245); // ovde ti 245 ne treba itd.
warning 217: neporavnane linije, gubis identaciju i compiler ne moze da prepozna kod ali nista strasno
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,660
Postovi:
86
Teme:
Pridružio se:Avg. 2012
13. Jan. 2014.
http://postimg.org/image/5x3vn1oc9/ Do ega moze ovo biti, to me interesuje.. ?
Mnogo mi je histno da ti saznam, ne mogu da nastavim rad skripte ako to ne sredim
Mnogo mi je histno da ti saznam, ne mogu da nastavim rad skripte ako to ne sredim
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,660
Postovi:
86
Teme:
Pridružio se:Avg. 2012
14. Jan. 2014.
Jel b neko mogao da pomogne oko ovog problema, stvarno ne znam o cemu se radi, ali daje ovaj glupi font
http://postimg.org/image/5x3vn1oc9/
http://postimg.org/image/5x3vn1oc9/
Godfather
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,660
Postovi:
86
Teme:
Pridružio se:Avg. 2012
14. Jan. 2014.
Sve sam uradio, kao sto si mi gore rekao, nista nisam menjao osim SCM ==> SendClientMessage
Ajde mi daj kompet kako treba da se odradi, ako mozes..Imam jos par problema a to je ovaj:
Ajde mi daj kompet kako treba da se odradi, ako mozes..Imam jos par problema a to je ovaj:
new igrac, string;
format(string,sizeof(string),"%s je poceo vuci igraca %s-u.",GetPlayerName(playerid),GetPlayerName(igrac));
(4786) : warning 202: number of arguments does not match definitionMorate biti prijavljeni da biste odgovorili na ovu temu.
Prijava