// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new AdminDuty[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
enum playerinfo
{
p_level,
}
new Player[MAX_PLAYERS][playerinfo];
CMD:onduty(playerid, params[])
{
if(Player[playerid][p_level] >= 1)
{
if(AdminDuty[playerid] == 0)
{
new string[128];
AdminDuty[playerid] = 1;
format(string, sizeof(string),"Admin %s is now onduty!", GetName(playerid));
SendClientMessageToAll(-1, string);
}
else SendClientMessage(playerid, -1,"You are already on duty.");
}
else SendClientMessage(playerid, -1,"You are not an admin.");
return 1;
}
CMD:offduty(playerid, params[])
{
if(Player[playerid][p_level] >= 1)
{
if(AdminDuty[playerid] == 1)
{
new string[128];
AdminDuty[playerid] = 0;
format(string, sizeof(string),"Admin %s is now offduty!", GetName(playerid));
SendClientMessageToAll(-1, string);
}
else SendClientMessage(playerid, -1,"You are already off duty.");
}
else SendClientMessage(playerid, -1,"You are not an admin.");
return 1;
}
stock GetName(playerid)
{
new pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
return pname;
}
C:\Users\Hazaras\Desktop\(FINAL)\filterscripts\test.pwn(98) : warning 203: symbol is never used: "offduty" C:\Users\Hazaras\Desktop\(FINAL)\filterscripts\test.pwn(98) : warning 203: symbol is never used: "onduty"
it means u are just not using it.. not an error. pawno is just reminding u :P
|
#include <zcmd>
Are you using ZCMD cmd processor or STRCMP? Do you have a coded command?
|
#include <a_samp>
#include <zcmd>
new AdminDuty[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
// rest of your code after the endif