28.03.2016, 14:55
The codes i use :
Both return
SERVER: Unknown command
Код:
CMD:me(playerid, params[]) { new string[128],msg[128],pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,ORANGE, "USAGE: /me <text>"); format(string,sizeof(string),"*%s %s",pname,msg); SendClientMessageToAll(GREY,string); return 1; } CMD:kick(playerid, params[]) { new string[128]; new id, reason, name[MAX_PLAYER_NAME]; if(sscanf(params, "us[100]",id, reason)) return SendClientMessage(playerid, -1, "USAGE: /kick <playerid/partofname> <reason>"); if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You're not an admin."); Kick(id); GetPlayerName(id, name, sizeof(name)); format(string, sizeof(string), "%s has been kicked of the server. Reason: %s", name, reason); SendClientMessageToAll(-1, string); return 1; }
SERVER: Unknown command