25.02.2009, 20:36
no this doesn't work :/
here is the code:
for this code i need a /unban [name] command
here is the code:
Код:
dcmd_banacc(playerid,params[]) { if(PlayerData[playerid][Level] >= 1) { new grund[128],opfer; if(sscanf(params,"uz",opfer,grund)) return SendClientMessage(playerid, COLOR_SYSTEM, "Usage: /ban [playerid] [reason]"); if (!IsPlayerConnected(opfer)) return SendClientMessage(playerid, COLOR_SYSTEM, "Invalid ID!"); new pname[MAX_PLAYER_NAME], oname[MAX_PLAYER_NAME],string[128]; GetPlayerName(playerid,pname,sizeof(pname)); GetPlayerName(opfer,oname,sizeof(oname)); format(string,sizeof(string),"[Server] %s has been namebanned by Admin %s [Reason: %s]",oname,pname,grund); SendClientMessageToAll(COLOR_RED,string); PlayerData[opfer][Banned] = 1; Kick(opfer); return 1; } else return SendClientMessage(playerid,COLOR_RED,"Admins only!"); }