Jump to content
  • 0

pomoc [HELP] - Príkaz /ban


Qvosty_JnR

Dotaz

Dobrý deň,

 

vždy ked zadám príkaz /ban 0 tak mi napíše použite /ban [id], ale ked dám príkaz /ban 1 tak v pohode to ide

 

CMD:ban(playerid,params[])

{

new id=strval(params);

if(!strval(params)) return SendClientMessage(playerid,-1,"Použitie: /ban [iD]");

else if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Hráč nieje pripojený");

else

{

   new meno[50];

   new str[50];

   GetPlayerName(playerid,meno,50);

   new meno2[50];

   GetPlayerName(id,meno,50);

   Ban(id);

format(str,sizeof(str),"Administrátor %s zabanoval hráča %s",meno,meno2);

SendClientMessageToAll(COLOR_RED,str);

}

return 1;

}

 

 

 

Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 0

Zkus

if(!strlen(params)) return SendClientMessage(playerid, -1,"Použitie: /ban [iD]");

A měl bys dat nejdříve SendClientMessageToAll(COLOR_RED, str);

A až potom Ban(id); Aby to zabanovanému taky tuhle hlášku napsalo :)

Link to comment
Share on other sites

  • 0

Zkus

if(!strlen(params)) return SendClientMessage(playerid, -1,"Použitie: /ban [iD]");

A měl bys dat nejdříve SendClientMessageToAll(COLOR_RED, str);

A až potom Ban(id); Aby to zabanovanému taky tuhle hlášku napsalo :)

ne nemá cenu Ban a Kick má přednost takže by to stejne neuviděl. lepší je si nato udělat Timer ktery po dokonaní ti dá ban a uvidíš i MSG s duvodem ;)

Link to comment
Share on other sites

  • 0
CMD:ban(playerid,params[])

{
new id=strval(params);
if(isnull(params)) return SendClientMessage(playerid,-1,"Použitie: /ban [ID]");

if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Hráč nieje pripojený");

}else{

   new meno[50];
   new str[50];
   GetPlayerName(playerid,meno,50);
   new meno2[50];
   GetPlayerName(id,meno,50);
   Ban(id);
format(str,sizeof(str),"Administrátor %s zabanoval hráča %s",meno,meno2);
SendClientMessageToAll(COLOR_RED,str);
}
return 1;
}

No neviem skus to takto

Link to comment
Share on other sites

  • 0

Dakujem hráčovi "INSNAE_25_ICON" už to beží ako má

 

Každopádne dakujem aj ostatným :d

CMD:ban(playerid,params[])

{
new id=strval(params);
if(isnull(params)) return SendClientMessage(playerid,-1,"Použitie: /ban [ID] [DVOVOD]");

if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Hráč nieje pripojený");

}else{

   new meno[50];
   new str[50];
   GetPlayerName(playerid,meno,50);
   new meno2[50];
   GetPlayerName(id,meno,50);
   Ban(id);
format(str,sizeof(str),"Administrátor %s zabanoval hráča %s [DVOVOD %s]",meno,meno2,params);
SendClientMessageToAll(COLOR_RED,str);
}
return 1;
}

Zabudol som ty napísať keď chceš aj dvovod tak som ti pridal :)

Link to comment
Share on other sites

  • 0
  • Globální moderátor

ne nemá cenu Ban a Kick má přednost takže by to stejne neuviděl. lepší je si nato udělat Timer ktery po dokonaní ti dá ban a uvidíš i MSG s duvodem ;)

 

cože? :d to jako že když bude SCM a ban až potom že to neuvidí? to je jako kdyby ti ujel autobus ale ve skutečnosti ještě nepřijel ...  sorry za OT

Link to comment
Share on other sites

  • 0

cože? :d to jako že když bude SCM a ban až potom že to neuvidí? to je jako kdyby ti ujel autobus ale ve skutečnosti ještě nepřijel ...  sorry za OT

As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message withSendClientMessage) will not reach the player. A timer must be used to delay the ban.

 

http://wiki.sa-mp.com/wiki/Ban

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...