10.10.2015, 19:16
%d in string used to get numbers %s used to get strings ( words and numbers ) and you miss to get player name.
PHP код:
CMD:trollban(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]:You are not rcon admin");
new targetid, str[75], name2[MAX_PLAYER_NAME];
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_ERROR,"Usage(playerid)");
GetPlayerName(targetid,name2,sizeof(name2));
format(str,sizeof(str),"(ADMIN BAN): An admin has banned %s",targetid);
SendClientMessageToAll(COLOR_ADMIN,str);
return 1;
}