29.09.2015, 20:37
Hi Guys i want Counvert two Cmds (/jail /mute) it's /jail id Min reason and same for Mute
i Don't want Min i want Second any 1 can Convert it please
i Don't want Min i want Second any 1 can Convert it please
PHP код:
CMD:jail(playerid,params[])
{
if(PlayerInfo[playerid][Admin] < 2) return SendClientMessage(playerid, COLOR_RED, "You need to be level 3 to use this command!");
{
new pId, time;
if(sscanf(params, "dds", pId, time, params[3])) return SendClientMessage(playerid, COLOR_RED, "Usage: /jail (ID) (Time In Minuets) (Reason)");
else if(!IsPlayerConnected(pId)) return SendClientMessage(playerid, COLOR_RED, "Invalid ID");
else if(PlayerInfo[pId][Jailed] == 1) return SendClientMessage(playerid, COLOR_RED, "Player is already in jail");
else
{
new pname[MAX_PLAYER_NAME], jname[MAX_PLAYER_NAME], string1[250];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(pId, jname, sizeof(jname));
SetPlayerInterior(pId, 6);
SetPlayerVirtualWorld(pId, 10);
SetPlayerPos(pId, 264.1542,77.6009,1001.0391);
SetTimerEx("UnJail",time*1000*60,0,"i",pId);
ResetPlayerWeapons(pId);
PlayerInfo[pId][Jailed] = 1;
format(string1, sizeof(string1), "Admin %s(%d) has jailed you for %d minutes; Reason: %s", GetPlayerNameEx(playerid), pId, time, params);
SendClientMessage(pId,0x00D9ADFF, string1);
}
}
return 1;
}
CMD:mute ( playerid, params[] )
{
if(PlayerInfo[playerid][Admin] < 3) return SendClientMessage(playerid, COLOR_RED, "You need to be level 3 to use this command!");
{
new pId, time;
if(sscanf(params, "dds", pId, time, params[3])) return SendClientMessage(playerid, COLOR_RED, "Usage: /mute (ID) (Time In Minuets) (Reason)");
else if(!IsPlayerConnected(pId)) return SendClientMessage(playerid, COLOR_RED, "Invalid ID");
else if(PlayerInfo[pId][Muted] == 1) return SendClientMessage(playerid, COLOR_RED, "Player is already Muted");
else
{
new pname[MAX_PLAYER_NAME], jname[MAX_PLAYER_NAME], string1[250];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(pId, jname, sizeof(jname));
SetTimerEx("UnMute",time*1000*60,0,"i",pId);
PlayerInfo[pId][Muted] = 1;
format(string1, sizeof(string1), "Admin %s(%d) has Muted you for %d minutes; Reason: %s", GetPlayerNameEx(playerid), pId, time, params);
SendClientMessage(pId,0x00D9ADFF, string1);
}
}
return 1;
}