/moviestyle and /mute /unmute Command -
Blackazur - 08.09.2012
How can i make a /moviestyle command, that the top and bottom black bars come and it looks like a movie? And a /mute and /unmute Command, i had so a Command, but it was bugged.
Re: /moviestyle and /mute /unmute Command -
vIBIENNYx - 08.09.2012
You mean..
[ame]http://www.youtube.com/watch?v=47QeZwJW74c[/ame]
I don't really want to hand it out though.
AW: /moviestyle and /mute /unmute Command -
Blackazur - 08.09.2012
But Must that scripting myself, or it is a Filterscript? And how can i script a /mute and /unmute command? xD
Re: /moviestyle and /mute /unmute Command - Guest3598475934857938411 - 08.09.2012
Are you actually trying to tell us, that you my friend is trying to script it yourself?
AW: /moviestyle and /mute /unmute Command -
Blackazur - 08.09.2012
What mean you? I mean whether it i scripting yourself, or whether it is a Filterscript. ^^
Re: /moviestyle and /mute /unmute Command - Riddy - 08.09.2012
pawn Код:
new muted[MAX_PLAYERS];
CMD:mute(playerid, params[])
{
if(sscanf(params,"u")) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mute [userid]
Muted[params] = 1;
return 1;
}
CMD:unmute(playerid, params[])
{
if(sscanf(params,"u")) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mute [userid]
Muted[params] = 1;
return 1;
}
OnPlayerText(playerid, text[])
{
if(Muted[playerid] == 1) { return 0; }
return 1;
}
I dont work with YCMD or STRCMP (+STRTOK), so use ZCMD for this...
Re: /moviestyle and /mute /unmute Command -
clarencecuzz - 08.09.2012
Not the best code I've seen for mute and unmute Riddy.
pawn Код:
new Muted[MAX_PLAYERS];
CMD:mute(playerid,params[])
{
new id, reason[60];
if(pInfo[playerid][AdminVariable] < 2) return SendClientMessage(playerid, 0xFF0000FF, "You Must Be An Administrator To Use This Command!");
//Obviously replace pInfo[playerid][AdminVariable] with your own admin variable, does not have to be 2, change at will.
if(sscanf(params, "us(No Reason)", id, reason)) return SendClientMessage(playerid, 0xFF0000FF, "SYNTAX ERROR: {00FF00}/MUTE {FFFF00}<PlayerID> <Optional: Reason>");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, "This Player Is Not Connected.");
if(Muted[id] == 1) return SendClientMessage(playerid, 0xFF0000FF, "This Player Is Already Muted. Use {00FF00}/UNMUTE{FF0000}.");
Muted[id] = 1;
new string[150];
new TargetName[MAX_PLAYER_NAME], AdminName[MAX_PLAYER_NAME];
GetPlayerName(id, TargetName, MAX_PLAYER_NAME);
GetPlayerName(playerid, AdminName, MAX_PLAYER_NAME);
format(string,sizeof(string),"You Have Been Muted By Administrator %s | Reason: %s", AdminName, reason);
SendClientMessage(id, 0xFF0000FF, string);
format(string,sizeof(string),"You Have Muted %s | Reason: %s", TargetName, reason);
SendClientMessage(playerid, 0xFFFF00FF, string);
format(string,sizeof(string),"%s Has Been Muted By Administrator %s | Reason: %s", TargetName, AdminName, reason);
SendClientMessageToAll(0xFF0000FF, string);
return 1;
}
CMD:unmute(playerid,params[])
{
new id;
if(pInfo[playerid][AdminVariable] < 2) return SendClientMessage(playerid, 0xFF0000FF, "You Must Be An Administrator To Use This Command!");
//Same rules apply here as above.
if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF0000FF, "SYNTAX ERROR: {00FF00}/UNMUTE {FFFF00}<PlayerID>");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, "This Player Is Not Connected.");
if(Muted[id] == 0) return SendClientMessage(playerid, 0xFF0000FF, "This Player Is Already Unmuted. Use {00FF00}/MUTE{FF0000}.");
Muted[id] = 0;
new string[150];
new TargetName[MAX_PLAYER_NAME], AdminName[MAX_PLAYER_NAME];
GetPlayerName(id, TargetName, MAX_PLAYER_NAME);
GetPlayerName(playerid, AdminName, MAX_PLAYER_NAME);
format(string,sizeof(string),"You Have Been Unmuted By Administrator %s.",AdminName);
SendClientMessage(id, 0xFFFF00FF, string);
format(string,sizeof(string),"You Have Unmuted %s.",TargetName);
SendClientMessage(playerid, 0xFFFF00FF, string);
format(string,sizeof(string),"%s Has Been Unmuted By %s.",TargetName,AdminName);
SendClientMessageToAll(0xFFFF00FF, string);
return 1;
}
public OnPlayerText(playerid, text[])
{
if(Muted[playerid] == 1) return SendClientMessage(playerid, 0xFF0000FF, "You Have Been Muted And Cannot Speak!");
//Code continues...
return 0;
}