Posts: 24
Threads: 16
Joined: Jun 2013
Reputation:
0
I Want to know how to make CMDS But just work for admin
So when any normal player use the admin cmd it says "You are not an admin"
I Want command like Admin Aduty
So when admin type /aduty it says " [ADMIN NAME] is on admin duty, /report for assistance
Help me please
Thanks.
Posts: 24
Threads: 16
Joined: Jun 2013
Reputation:
0
C:\Documents and Settings\edku dreams\Desktop\MyScript\gamemodes\avt.pwn(331) : error 017: undefined symbol "AdminDuty"
C:\Documents and Settings\edku dreams\Desktop\MyScript\gamemodes\avt.pwn(331) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\edku dreams\Desktop\MyScript\gamemodes\avt.pwn(331) : error 029: invalid expression, assumed zero
C:\Documents and Settings\edku dreams\Desktop\MyScript\gamemodes\avt.pwn(331) : fatal error 107: too many error messages on one line
Posts: 47
Threads: 10
Joined: May 2012
Reputation:
0
Try this:
CMD:duty(playerid,params[])
{
if(!IsPlayerAdmin(playerid))
{
new string[124]; //declaring new string size for formatting
AdminDuty[playerid]=1; //setting them on duty
format(string,sizeof(string),"%s is now on admin duty!",Name(playerid)); //formatting the string. Using Name as the specifier thing
SendClientMessageToAll(-1,string); //sending it. -1 is basic white color.
}
else
{
SendClientMessage(playerid,COLOR_RED,"ERROR:You need to be an admin");
}
return 1;
}
if that gets any errors, try adding a extra } on top of return 1;