Qvosty_JnR 1 Odesláno: 30. Září, 2014 Share Odesláno: 30. Září, 2014 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 More sharing options...
0 danda951 0 Odesláno: 30. Září, 2014 Share Odesláno: 30. Září, 2014 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 More sharing options...
0 Amenadiel 286 Odesláno: 30. Září, 2014 Share Odesláno: 30. Září, 2014 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 More sharing options...
0 INSANE_25_ICON 0 Odesláno: 1. Říjen, 2014 Share Odesláno: 1. Říjen, 2014 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 More sharing options...
0 Qvosty_JnR 1 Odesláno: 1. Říjen, 2014 Author Share Odesláno: 1. Říjen, 2014 Dakujem hráčovi "INSNAE_25_ICON" už to beží ako má Každopádne dakujem aj ostatným Link to comment Share on other sites More sharing options...
0 INSANE_25_ICON 0 Odesláno: 1. Říjen, 2014 Share Odesláno: 1. Říjen, 2014 Dakujem hráčovi "INSNAE_25_ICON" už to beží ako má Každopádne dakujem aj ostatným 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 More sharing options...
0 Globální moderátor Hip 191 Odesláno: 1. Říjen, 2014 Globální moderátor Share Odesláno: 1. Říjen, 2014 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? 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 More sharing options...
0 Amenadiel 286 Odesláno: 1. Říjen, 2014 Share Odesláno: 1. Říjen, 2014 cože? 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 More sharing options...
Dotaz
Qvosty_JnR 1
Link to comment
Share on other sites
7 odpovědí na tuto otázku
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now