09.05.2014, 22:21
Hello, I've been unable to create this command, it's very simple, but for some reason I get errors. I need someone to create two commands, one is '/n'(noob chat), other is '/askq'(sends their question to all admins online) and finally '/answerq'(must notify the player using /askq and all the other admins online)
FYI: I don't use CMD:, or COMMAND:, I use this;
if(strcmp(cmd,"/commandhere",true)==0)
EXAMPLE:
FYI: I don't use CMD:, or COMMAND:, I use this;
if(strcmp(cmd,"/commandhere",true)==0)
EXAMPLE:
Код HTML:
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new count = 0;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "On-Duty Administrators");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
{
format(string, 256, "Administrator: %s - [%d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"There are currently no administrators on duty. ");
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "----------------------------------------------------------");
}
return 1;
}