SA-MP Forums Archive
"TurfWars" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: "TurfWars" (/showthread.php?tid=500005)



"TurfWars" - AustinWeerdGuy - 10.03.2014

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


Re: "TurfWars" - Matess - 10.03.2014

Just try put this somewhere:

TurfWarsAdminMenu(playerid);

or

TurfWarsEditTurfsSelection(playerid);


Re: "TurfWars" - AustinWeerdGuy - 10.03.2014

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

TurfWarsAdminMenu(playerid);

or

TurfWarsEditTurfsSelection(playerid);
What would it help?


Re: "TurfWars" - NewerthRoleplay - 10.03.2014

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


Re : "TurfWars" - Golimad - 10.03.2014

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


Re: "TurfWars" - AustinWeerdGuy - 11.03.2014

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.


Re: Re : "TurfWars" - AustinWeerdGuy - 11.03.2014

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