11.04.2012, 08:34
===> I have made this /onduty and /offduty cmd. But i don't no how to write it in zcmd?? Like "dcmd_onduy"??
Can please anyone Convert this??
Can please anyone Convert this??
pawn Код:
//------------------------------------------------------------------------------
if(strcmp(cmd, "/onduty", true) == 0) {
if(PlayerInfo[playerid][Level] >= 2) {
CMDMessageToAdmins(playerid,"Now On Duty"); GetPlayerName(playerid, adminname, sizeof(adminname));
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1) {
SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid,38,500000); SetPlayerHealth(playerid,100000); SetPlayerColor(playerid,pink); format(string,256,"Administrator %s Has Now On Admin Duty",adminname); SendClientMessage(i,pink,string); }
}
} else {
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); }
return 1; }
//------------------------------------------------------------------------------
if(strcmp(cmd, "/offduty", true) == 0)
{
if(PlayerInfo[playerid][Level] >= 2)
{
CMDMessageToAdmins(playerid,"Now Off Duty"); GetPlayerName(playerid, adminname, sizeof(adminname));
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1) {
ResetPlayerWeapons(playerid);
ForceClassSelection(playerid);
SetPlayerHealth(playerid,0);
format(string,256,"Administrator %s Has End With His Admin Duty",adminname);
SendClientMessage(i,pink,string); }
}
} else {
SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); }
return 1; }