dcmd_onduty(playerid,params[])
{
#pragma unused params
if (AccInfo[playerid][Level] >= 1)
{
sendCommandToAdmins)playerid,"onduty");
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "%s is Now On Admin Duty",pName);
SendClientMessageToAll(COLOR_YELLOW, string);
SetMarkerForPlayer( i, playerid, 0x800080AA);
}
else
SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}
dcmd_offduty(playerid,params[])
{
#pragma unused params
if (AccInfo[playerid][Level] >= 1)
{
sendCommandToAdmins)playerid,"offduty");
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "%s Is Now Off Admin Duty",pName);
SendClientMessageToAll(COLOR_YELLOW, string);
SetMarkerForPlayer( i, playerid, 0xFFFFFFAA);
}
else
SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}
C:\DOCUME~1\Phoebe\Desktop\GTASAC~1\SAMP03~1\FILTER~1\LuxAdmin.pwn(11211) : warning 203: symbol is never used: "dcmd_offduty"
C:\DOCUME~1\Phoebe\Desktop\GTASAC~1\SAMP03~1\FILTER~1\LuxAdmin.pwn(11211) : warning 203: symbol is never used: "dcmd_onduty"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(onduty, 6, cmdtext);
dcmd(offduty, 7, cmdtext);
return 0;
}
Bad habit, because the only thing you get is a bugged script.
On topic: You need to add the commands under OnPlayerCommandText as well if you use dcmd. pawn Код:
|
dcmd_onduty(playerid,params[])
{
#pragma unused params
if (AccInfo[playerid][Level] >= 1)
{
sendCommandToAdmins(playerid, "onduty");
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "%s is Now On Admin Duty",pName);
SendClientMessageToAll(COLOR_YELLOW, string);
SetMarkerForPlayer( i, playerid, 0x800080AA);
}
else
SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}
dcmd_offduty(playerid,params[])
{
#pragma unused params
if (AccInfo[playerid][Level] >= 1)
{
sendCommandToAdmins(playerid, "offduty");
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "%s Is Now Off Admin Duty",pName);
SendClientMessageToAll(COLOR_YELLOW, string);
SetMarkerForPlayer( i, playerid, 0xFFFFFFAA);
}
else
SendClientMessage(playerid, COLOR_YELLOW,"You Are Not A Admin.");
}