27.03.2011, 15:00
how change this script <zcmd> in strcmp
Код:
//at top of script #include <zcmd> forward UnmutePlayer(playerid); new Muted[MAX_PLAYERS]; zcmd(mute, playerid, params[]) //with time in minutes { if(IsPlayerAdmin(playerid)) { new mplayer, time, reason[96]; if(!sscanf(params, "uis", mplayer, time, reason)) { Muted[mplayer] = 1; SetTimerEx("UnmutePlayer", false, 60000*time, "i", playerid); new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "You were muted by %s for %d minutes. Reason: %s", name, time, reason); SendClientMessage(mplayer, 0xFF3300FF, string); return 1; } else return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /mute [id/partname] [time in minutes] [reason]); } else return SendClientMessage(playerid, 0xFF3300FF, "ERROR: You are not an admin and may not use this command!"); } public UnmutePlayer(playerid) { SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You have been unmuted."); Muted[playerid] = 0; } public OnPlayerText(playerid, text[]) { if(Muted[playerid]) SendClientMessage(playerid, 0xFF3300FF, "SERVER: You are muted and may not speak!"), return 0; else return 1; }