Need help creating 2 menus!!!--TOPIC CLOSED-- -
Epic Shower - 09.03.2010
Hello!
I've been learning how to make menus.
I sucessfully made one with 2 columns.
Here's the code so you can see:
Код:
new Menu:ParkourTeleport;
ParkourTeleport = CreateMenu("Start the Mission?", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(ParkourTeleport, 1, "Yes");
AddMenuItem(ParkourTeleport, 2, "No");
if(strcmp(cmdtext, "/ParkourMission", true) == 0)
{
ShowMenuForPlayer(ParkourTeleport, playerid);
return true;
}
new Menu:currentParkourTeleport = GetPlayerMenu(playerid);
if(currentParkourTeleport == ParkourTeleport)
{
switch(row)
{
case 0:
{
GameTextForPlayer(playerid,"Mission Started",6000,0);
SetPlayerPos(playerid, 1094.5160,-2037.0210,82.7586);
SetPlayerInterior(playerid, 0);
}
case 1:
{
SendClientMessage(playerid, 0xFFFFFFFF, "You have selected NO.");
GameTextForPlayer(playerid,"OH",5000,0);
}
return 1;
}
return 1;
}
So i went to make another just like the first but with 4 columns here's the code i wrote:
Код:
new Menu:Missions;
Missions = CreateMenu("Available Missions", 4, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(Missions, 1, "Mission 1");
AddMenuItem(Missions, 2, "Mission 2");
AddMenuItem(Missions, 3, "Mission 3");
AddMenuItem(Missions, 4, "Mission 4");
if(strcmp(cmdtext, "/Missions", true) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "/MasterOfTheiving");
SendClientMessage(playerid, COLOR_PICA, "Difficulty: Hard");
SendClientMessage(playerid, COLOR_WHITE, "/ParkourMission");
SendClientMessage(playerid, COLOR_YELLOW, "Difficulty: Moderate");
ShowMenuForPlayer(Missions, playerid);
return true;
}
new Menu:currentMissions = GetPlayerMenu(playerid);
if(currentMissions == Missions)
{
switch(row)
{
case 0:
{
GameTextForPlayer(playerid,"MISSION 1",5000,0);
}
case 1:
{
GameTextForPlayer(playerid,"MISSION 2",5000,0);
}
case 2:
{
GameTextForPlayer(playerid,"MISSION 3",5000,0);
}
case 3:
{
GameTextForPlayer(playerid,"MISSION 4",5000,0);
}
return 1;
}
return 1;
}
My server works fine with only the menu with 2 columns but when i add the one with 4 it either makes my pawno crash or shuts down my sa-mp server.exe after loading.
Heres picture of pawno crash:
PLEASE HELP :'(
Re: Help!My sa-mp server.exe shuts down after opened!!! -
Torran - 09.03.2010
Please use [pawn] tags and make your code more readable
Re: Help!My sa-mp server.exe shuts down after opened!!! -
aircombat - 09.03.2010
that means u have alot really alot of errors so pawno couldn't give them so it crashed , and most of time alot of errors come from missing a bracket so check ur script again
________
HOW TO BOIL
Re: Help!My sa-mp server.exe shuts down after opened!!! -
Epic Shower - 09.03.2010
Quote:
Originally Posted by [AC
Etch ]
that means u have alot really alot of errors so pawno couldn't give them so it crashed , and most of time alot of errors come from missing a bracket so check ur script again
|
How do i have errors if everything is correct
I don't thats not the problem because it only happens that if i try to make a filterscript with 2 menus.
Before i started making the filterscript i did it inside my gamemode and it wouldn't give any error, but when i ran my sa-mp server.exe it would just open it then close it.
Can someone please check the code?
Re: Need help creating 2 menus!!! -
Naxix - 09.03.2010
Mate? you were supposed to get teleported to the locations of the 4 missions right?
As far as i see you don't have any click able menu that sets a players pos? you only have GameTexts, as i far as i know that's the reason?
Re: Need help creating 2 menus!!! -
Epic Shower - 09.03.2010
Ye the first Menu works(but it has to be alone).
If i add another Menu none of them works, or does other things like i said above.
The Menu is a none clickable one(dunno why), it has the SetplayerPos and the rest needed don't hurry.
I'm just wondering why it won't let me have 2 Menus...
Heres the image of the Menu:
Re: Need help creating 2 menus!!! -
Epic Shower - 09.03.2010
I have solved the problem myself.
Thanks for the help anyway
----TOPIC CLOSED----