Question
#1

I have 2 commands that for some reason don't work in game, would anyone have any idea whats wrong.

/buyhouse when i type that nothing happens

Код:
	if(strcmp(cmd, "/houseupgrade", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pHouseAccepted] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You don't own a house!");
	            return 1;
	        }
         	ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYLE_LIST,string,"House Interior Upgrade\nHouse Car Upgrade\nHouse Nametag Upgrade\nHouse Miscellaneous Upgrade","Proceed","Cancel");
          	return 1;
           	}
		}
	/*if(strcmp(cmd, "/houseupgrade", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pHouseAccepted] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You don't own a house!");
	            return 1;
	        }
		    else
		    {
			    ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYLE_LIST,string,"House Interior Upgrade\nHouse Car Upgrade\nHouse Nametag Upgrade\nHouse Miscellaneous Upgrade","Proceed","Cancel");
			}
		}
	 	return 1;
	}*/

	if(strcmp(cmd, "/buyhouse", true) == 0)
and /buylic

Код:
	/*if(pickupid == iLic)
	{
	    GameTextForPlayer(playerid, "~w~ /buylic to buy licenses", 5000, 5);
	    return 1;
	}*/
Код:
	/*if(strcmp(cmd, "/buylic", true) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid,3.0,1490.2982,1305.6770,1093.2963))
	    {
	        ShowPlayerDialog(playerid, LICMENU, DIALOG_STYLE_LIST, "Buy License","Drivers License[$150]\nFly License[$1000]\nBoat License[$200]\nFishing License[$250]","Buy","Close");
		}
		else
		{
		    SendClientMessage(playerid, COLOR_WHITE, "      Server: Not at the DMV");
		    return 1;
		    }*/
Reply
#2

I get one error when trying to compile it

Desktop\samp03csvr_win32\pawno\GLRP.pwn(27020) : error 017: undefined symbol "LICMENU"

where would I get LICMENU from?
Reply
#3

LICMENU is in the ShowPlayerDialog...

Just add a "new LICMENU;" somewhere and you'll be fine there
Reply
#4

Hi,

thanks for the response

I don't know where to add the LICMENU nor make a new one.
Reply
#5

van anyone help how to make that LICMENU?
Reply
#6

Just do

pawn Код:
#define LICMENU 1337
Reply
#7

Thanks,

I found the define

Код:
#define LICMENU 9010
LICMENU DIALOG

Код:
	if(dialogid == LICMENU)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(PlayerInfo[playerid][pCash] > 149)
				{
					GivePlayerMoney(playerid, -150);
					PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-150;
					PlayerInfo[playerid][pCarLic] = 1;
					SendClientMessage(playerid, COLOR_WHITE, " You bought a drivers license for $150");
				}
				if(listitem == 1)
				{
				    if(PlayerInfo[playerid][pCash] > 999)
					{
						GivePlayerMoney(playerid, -1000);
						PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-1000;
      					PlayerInfo[playerid][pFlyLic] = 1;
						SendClientMessage(playerid, COLOR_WHITE, "  You bought a flying license for $1000");
					}
					if(listitem == 2)
					{
     					if(PlayerInfo[playerid][pCash] > 199)
						{
							GivePlayerMoney(playerid, -200);
							PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-200;
							PlayerInfo[playerid][pBoatLic] = 1;
							SendClientMessage(playerid, COLOR_WHITE, " You bought a boat license for $200");
						}
						if(listitem == 3)
						{
						    if(PlayerInfo[playerid][pCash] > 249)
							{
								GivePlayerMoney(playerid, -250);
								PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-250;
								SendClientMessage(playerid, COLOR_WHITE, " You bought a fishing license for $250");
								PlayerInfo[playerid][pFishLic] = 1;
								return 1;
							}	}
						}
	  				}
				}
			}
		}
	}

here is the command

Код:
	if(strcmp(cmd, "/buylic", true) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid,3.0,1490.2982,1305.6770,1093.2963))
	    {
	        ShowPlayerDialog(playerid, LICMENU, DIALOG_STYLE_LIST, "Buy License","Drivers License[$150]\nFly License[$1000]\nBoat License[$200]\nFishing License[$250]","Buy","Close");
		}
		else
		{
		    SendClientMessage(playerid, COLOR_WHITE, "      Server: Not at the DMV");
		    return 1;
		}
	}
wont work the dialog is messed up

what was the 1337 for anyway?
Reply
#8

the 1337 was the value.
Reply
#9

The licmenu dialog is messed up it wont line up

{< this matches with
|
|
|
| |
} > this the dialog code wont let me compile it.
}

Have a look yourself using Notepad ++
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)