[pomoc]mute

Započeo Aldin Begovic
14. Mar. 2012. Zaključano
844
pregleda
9
postova
Aldin Begovic
4
Made Man
14. Mar. 2012.
mod:GF
opis prolema:Kada nekog /mute on i dalje moze da pise na chatove!tj njemu izbaci da nemoze pisat al i dalje mu pokaze text iznad glave ! neznam u cemu je problem ! Evo komanda
cod:
if(strcmp(cmd, "/mute", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/mute [Korisnicki ID ili Ime Korisnika] ");
return 1;
}
new playa;
new time;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
time = strval(tmp);
if (PlayerInfo >= 1)
{
    if(IsPlayerConnected(playa))
    {
        if(playa != INVALID_PLAYER_ID)
        {
    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 0)
{
PlayerInfo = 1;
PlayerInfo = time*60;
printf("AdmCmd: %s silenced %s",sendername,  giveplayer);

                     
format(string, sizeof(string), " %s utisan si od %s, na %d minuta",giveplayer ,sendername,time);
SendClientMessage(giveplayerid, COLOR_WHITE,string);
format(string, sizeof(string), " Mute| %s je utisan od %s, na %d minuta",giveplayer,sendername,time);
    SendAdminMessage(COLOR_RED, string);
}
else
{
PlayerInfo = 0;
PlayerInfo = 0;
printf("AdmCmd: %s unsilenced %s",sendername,  giveplayer);

format(string, sizeof(string), " %s utisan si od %s, na 0 minuta",giveplayer ,sendername);
SendClientMessage(giveplayerid,COLOR_WHITE,string);
format(string, sizeof(string), " Mute| %s je utisan od %s, na 0 minuta",giveplayer,sendername);
           
SendAdminMessage(COLOR_LIGHTRED, string);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}Admini samo!");
}
}
return 1;
}
Marko Koprivanac
5
Underboss
14. Mar. 2012.
Jel si koristio ChatBouble?!
dock
5
Crime Lord
14. Mar. 2012.
Moze pisati u chatovima zato sto nisi verovatno napravio proveru da li je igrac mutan ili nije u komandama za chatove evo to uradi ovako recimo:

if(PlayerInfo > 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi ste mutani! Ne mozete govoriti!");


to recimo ubaci u komandu za svaki chat i nece biti problema 😉
Aldin Begovic
4
Made Man
14. Mar. 2012.
dock wrote on March 14, 2012, 10:44 pm:
Moze pisati u chatovima zato sto nisi verovatno napravio proveru da li je igrac mutan ili nije u komandama za chatove evo to uradi ovako recimo:

if(PlayerInfo > 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi ste mutani! Ne mozete govoriti!");


to recimo ubaci u komandu za svaki chat i nece biti problema 😉

Da igracu izbaci taj text da je mutiran i da nemoze pricat al opet dopusti mu da napise text !
Blaeks_Biofor
5
Forum Don
14. Mar. 2012.
Stavi proveru medju chatove, kada je igrac izmutiran da mu kaze da ne moze to da koristi, kapiras?
dock
5
Crime Lord
14. Mar. 2012.
Aldin Begovic wrote on March 14, 2012, 10:44 pm:
Moze pisati u chatovima zato sto nisi verovatno napravio proveru da li je igrac mutan ili nije u komandama za chatove evo to uradi ovako recimo:

if(PlayerInfo > 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi ste mutani! Ne mozete govoriti!");


to recimo ubaci u komandu za svaki chat i nece biti problema 😉

Da igracu izbaci taj text da je mutiran i da nemoze pricat al opet dopusti mu da napise text !

to stavis odmah ispod IsPlayerConnected znaci mozda stavis na kraj komande pa on zavrsi sta treba i tek onda izadje komentar, znaci stavi odma ispod IsPlayerConnected 🙂
Aldin Begovic
4
Made Man
15. Mar. 2012.
Da stavio sam tako kako ste rekli al i dalje nece ! Tj ne ibaci mu na chatu da je napisao samo iznad glOOve !
Blaeks_Biofor
5
Forum Don
15. Mar. 2012.
Ajo pa ti tek sad kazes 😄, pa mora ostati text iznad glave  😛
dock
5
Crime Lord
15. Mar. 2012.
Prvo nadji
public OnPlayerText(playerid, text[])
{


dodaj
if(PlayerInfo > 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi ste mutani! Ne mozete govoriti!");


da izgleda ovako:
public OnPlayerText(playerid, text[])
{
    if(PlayerInfo > 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi ste mutani! Ne mozete govoriti!");

   
   
kod komandi za chat imas ovo:
if(IsPlayerConnected(playerid))
{


tu dodas isto ovo
if(PlayerInfo > 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi ste mutani! Ne mozete govoriti!");


i to ce izgledati:
if(IsPlayerConnected(playerid))
{
if(PlayerInfo > 0) return SendClientMessage(playerid, COLOR_GRAD1, "*Vi ste mutani! Ne mozete govoriti!");


Nebi trebalo da bude problema..

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha