pawn Код:
dcmd_ban(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new reason, pid;
if(sscanf(params,"u",pid)) SendClientMessage(playerid, 0xF60000AA, "USAGE: /ban [playerid][reason](optional)");
else
{
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been banned. Reason: %i",name,reason);
SendClientMessageToAll(0xF60000AA,string);
Ban(pid);
return 1;
}
return 1;
}
dcmd_kick(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new reason, pid;
if(sscanf(params,"u",pid)) SendClientMessage(playerid, 0xF60000AA, "USAGE: /kick [playerid][reason](optional)");
else
{
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been kicked. Reason: %i",name,reason);
SendClientMessageToAll(0xF60000AA,string);
Kick(pid);
return 1;
}
return 1;
}
It bans the player and all that, the problem is that when I type in the reason, it only comes: "Player is banned. Reason: 0"