Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/mute", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid/PartOfName] [time]");
- return 1;
- }
- new playa;
- new mute;
- playa = ReturnUser(tmp);
- mute = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(PlayerInfo[playa][pMuted] == 0)
- {
- PlayerInfo[playa][pMuted] = 1;
- printf("AdmCmd: %s silenced %s",sendername, giveplayer);
- format(string, sizeof(string), "AdmCmd: %s was silenced by %s for %d minutes.",giveplayer, sendername, money);
- PlayerInfo[playa][pMuteTime] = mute*60;
- ABroadCast(COLOR_LIGHTRED,string,1);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment