23.08.2010, 23:49
okay I just learnt zcmd and sscanf today and im loving it, but i have one problem
it makes the reason for being kicked only one word, like if i type /kick 0 for hacking it will show up as
id 0 has been kicked reason: for
it will onyl show one word, how do i fix this?
Код:
CMD:kick(playerid,params[]) { new str, id; if(Logged[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"You are not logged in!"); if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,0xFF0000FF,"You are not an admin!"); if(sscanf(params,"us[128];",id,str)) { SendClientMessage(playerid,0xFF0000FF,"USAGE: /kick [ID] [REASON]"); return 1; } if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID"); if(PlayerInfo[id][Owner] == 1) return SendClientMessage(playerid,0xFF0000FF,"You cannot use this command on the owner!"); new string[128]; new name[MAX_PLAYER_NAME]; new nname[MAX_PLAYER_NAME]; GetPlayerName(id,name,MAX_PLAYER_NAME); GetPlayerName(playerid,nname,MAX_PLAYER_NAME); format(string,sizeof(string),"You have been kicked by Admin %s for: %s",nname,str); SendClientMessage(id,ORANGE,string); format(string,sizeof(string),"You have kicked %s for: %s",name,str); SendClientMessage(playerid,ORANGE,string); format(string,sizeof(string),"Admin %s has Kicked out %s for: %s",nname,name,str); SendClientMessageToAll(ORANGE,string); Kick(id); return 1; }
id 0 has been kicked reason: for
it will onyl show one word, how do i fix this?