10.10.2015, 19:00
I think it is better this way.
Код:
CMD:trollban(playerid,params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]:You are not rcon admin"); new targetid,str[75],adm[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME],msg[64]; if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_ERROR,"Usage(playerid)"); GetPlayerName(targetid,name,sizeof(name)); format(str,sizeof(str),"(ADMIN BAN): An admin has banned %s",name); SendClientMessageToAll(COLOR_ADMIN,str); GetPlayerName(playerid,adm,sizeof(adm)); format(msg,sizeof(msg),"You have been banned by admin %s",adm); SendClientMessage(targetid,COLOR_ADMIN,msg); return 1; }