"TurfWars"
#1

Well hello guys. Right now, I am trying to fix a turf system. And I have found a couple of codes in my script like this:

Код:
TurfWarsAdminMenu(playerid)
{
	new string[128];
	format(string,sizeof(string),"Edit Turfs...\nEdit Family Colors...");
	ShowPlayerDialog(playerid,TWADMINMENU,DIALOG_STYLE_LIST,"Turf Wars - Admin Menu:",string,"Select","Exit");
}

TurfWarsEditTurfsSelection(playerid)
{
	new string[2048];
	for(new i = 0; i < MAX_TURFS; i++)
	{
	    if(TurfWars[i][twOwnerId] != -1)
	    {
	        if(TurfWars[i][twOwnerId] < 0 || TurfWars[i][twOwnerId] > MAX_FAMILY-1)
	        {
	        	format(string,sizeof(string),"%s%s - \t(Invalid Family)\n",string,TurfWars[i][twName]);
			}
			else
			{
			    format(string,sizeof(string),"%s%s - \t(%s)\n",string,TurfWars[i][twName],FamilyInfo[TurfWars[i][twOwnerId]][FamilyName]);
			}
	    }
	    else
	    {
	        format(string,sizeof(string),"%s%s - \t(%s)\n",string,TurfWars[i][twName],"Vacant");
	    }
	}
	ShowPlayerDialog(playerid,TWEDITTURFSSELECTION,DIALOG_STYLE_LIST,"Turf Wars - Edit Turfs Selection Menu:",string,"Select","Back");
}
And I can see there is a "menu" in the code but I cant find any CMD that is opening up the menu. So my question is what should I do to find out, how to open this menu?

Thanks.
Austin
Reply
#2

Just try put this somewhere:

TurfWarsAdminMenu(playerid);

or

TurfWarsEditTurfsSelection(playerid);
Reply
#3

Quote:
Originally Posted by Matess
Посмотреть сообщение
Just try put this somewhere:

TurfWarsAdminMenu(playerid);

or

TurfWarsEditTurfsSelection(playerid);
What would it help?
Reply
#4

Use CTRL+F to search for them, that's all I can think of from what you've given us.
Reply
#5

It should be similar to this :
pawn Код:
CMD:turfwarsmenu(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Only RCON admins can use this command");
    SendClientMessage(playerid, COLOR_RED, "Turf Wars Admin Menu has been opened.");
    TurfWarsAdminMenu(playerid);
    return 1;
}
CMD:turfwarsedit(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Only RCON admins can use this command");
    SendClientMessage(playerid, COLOR_RED, "Turf Wars Edition Admin Menu has been opened.");
    TurfWarsEditTurfsSelection(playerid);
    return 1;
}
Edit the conditions, like if anybody can open the turf menu, or just RCON admins or just Ingame admins;
Ingame admins should be similar to this : PlayerInfo[playerid][Adminlevel] = specifiq level;
Give us more details about what you need
Reply
#6

Anyways, I am trying to do a working turf wars script. And I saw I had many codes about this but almost no commands.. So I just wanted to know if there is a way to create this commands or something because I really need the script.
Reply
#7

Quote:
Originally Posted by Golimad
Посмотреть сообщение
It should be similar to this :
pawn Код:
CMD:turfwarsmenu(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Only RCON admins can use this command");
    SendClientMessage(playerid, COLOR_RED, "Turf Wars Admin Menu has been opened.");
    TurfWarsAdminMenu(playerid);
    return 1;
}
CMD:turfwarsedit(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Only RCON admins can use this command");
    SendClientMessage(playerid, COLOR_RED, "Turf Wars Edition Admin Menu has been opened.");
    TurfWarsEditTurfsSelection(playerid);
    return 1;
}
Edit the conditions, like if anybody can open the turf menu, or just RCON admins or just Ingame admins;
Ingame admins should be similar to this : PlayerInfo[playerid][Adminlevel] = specifiq level;
Give us more details about what you need
It seems like this works Thanks man +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)