22.01.2015, 10:48
Guys Could You tell me how to add [Reason] Function Please
Thanks ++rep
Код HTML:
if(strcmp(cmd, "/mute", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mute [playerid/PartOfName][Reason] ");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
strmid(giveplayer, PlayerRPName(playa), 0, MAX_PLAYER_NAME);
strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
if(PlayerInfo[playa][pMuted] == 0)
{
PlayerInfo[playa][pMuted] = 1;
format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s was muted by %s.",giveplayer ,sendername);
ABroadCast(COLOR_WHITE,string,1);
}
else
{
PlayerInfo[playa][pMuted] = 0;
format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s was unmuted by %s.",giveplayer ,sendername);
ABroadCast(COLOR_WHITE,string,1);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
}


