Command /ban, litle problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Command /ban, litle problem (
/showthread.php?tid=382210)
Command /ban, litle problem -
CrossOv3r - 02.10.2012
Hi all, thanks to help me.
Well, i have a /ban command, and the problem its simple.
When i use /ban , send the message to all:
Player %s, has been banned (reason:%s),
But just show the name of the player, dont show the reason. Help me please
Код:
//Banear a un jugador
if(strcmp(cmd,"/banear", true) == 0)
{
if(Informacion[playerid][Administrador] == 1)
{
tmp = strtok(cmdtext,idx);
tmp2 = strtok(cmdtext,idx);
new razon = strval(tmp2);
new player = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRIS, "Use /banear [id] + [razуn]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COLOR_GRIS, "Use /banear [id] + [razуn]");
if(!IsPlayerConnected(player)) return SendClientMessage(playerid, -1, "Jugador desconectado");
GetPlayerName(player, nombre, sizeof(nombre));
format(string, sizeof(string), "El jugador %s fue baneado del servidor %s", nombre, razon);
SendClientMessageToAll(COLOR_NARANJA, string);
Ban(player);
}
else{SendClientMessage(playerid, COLOR_GRIS,"No eres administrador");}
return 1;
}
The tmp:
Код:
new tmp[128];
new tmp2[128];