REDCOLOR = you are now onduty !

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 On 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; }
|
==> /Onduty. You can change color by yourself. If it really worked than Please Don't forget to Rep me
![]() pawn Код:
pawn Код:
|
CMD:onduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
//SetPlayerSkin(playerid, 294); - Commented by Voltage
new string[128];
format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_YELLOW, string);
}
else
{
SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
//SetPlayerSkin(playerid, 299); - Commented by Voltage
PlayerInfo[playerid][pAdminDuty] = 0;
}
return 1;
}
|
Код:
CMD:onduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
//SetPlayerSkin(playerid, 294); - Commented by Voltage
new string[128];
format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_YELLOW, string);
}
else
{
SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
//SetPlayerSkin(playerid, 299); - Commented by Voltage
PlayerInfo[playerid][pAdminDuty] = 0;
}
return 1;
}
|
(4550) : error 017: undefined symbol "PlayerInfo" D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : warning 215: expression has no effect D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : error 001: expected token: ";", but found "]" D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : error 029: invalid expression, assumed zero D:\Universal stunting 0.3c\gamemodes\GHV.pwn(4550) : fatal error 107: too many error messages on one line