#1

I want write a code join job dialog , but when compiler not running.
image - code :
Код HTML:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == Xin_viec) 
	{
		if(response) return 1;
		switch(listitem)
		{
			case 0: // Taxi Driver
			{
				SetPVarInt(playerid, "jobSelection", 17);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
			}
			else
			{
				//SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Phai Doi Giam Doc Cong Ty Duyet Don Nghi Viec Sau 2h.");
			}
			case 1: // Craftsman
			{
				SetPVarInt(playerid, "jobSelection", 18);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
			}
			else
			{
				//SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Phai Doi Giam Doc Cong Ty Duyet Don Nghi Viec Sau 2h.");
			}
			case 2: // Pizza Boy
			{
				SetPVarInt(playerid, "jobSelection", 21);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
			}
			else
			{
				//SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Phai Doi Giam Doc Cong Ty Duyet Don Nghi Viec Sau 2h.");
			}
			case 3: // Don rac
			{
				SetPVarInt(playerid, "jobSelection", 27);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
			}
			else
			{
				//SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Phai Doi Giam Doc Cong Ty Duyet Don Nghi Viec Sau 2h.");
			}
		}
	}
	
	if(dialogid == Job_Dialog)
	{
		if(!response) return 1;	

	    switch(listitem)
	    {
	        case 0:
	        {
	        	PlayerInfo[playerid][pJob] = GetPVarInt(playerid, "jobSelection");
	        	SendClientMessageEx(playerid, COLOR_YELLOW, "Ban da thay doi cong viec dau tien cua minh!");
			}
	        case 1:
			{
		 		PlayerInfo[playerid][pJob2] = GetPVarInt(playerid, "jobSelection");
		 		SendClientMessageEx(playerid, COLOR_YELLOW, "Ban da thay doi cong viec thu hai cua minh!");
			}
	    }
	}
Код HTML:
#define			Xin_viec					(6000)
#define			Job_Dialog					(6001)
Код HTML:
CMD:xinviec(playerid, params[])
{
	ShowPlayerDialog(playerid, Xin_viec, DIALOG_STYLE_LIST, "Trung Tam Viec Lam", "Taxi\nThu Cong\nGiao Pizza\nDon Rac", "Chon", "Khong");
	return 1;
}
Reply
#2

Try placing it on OnDialogResponse as well.

Код:
    if(dialogid == Xin_viec)
	{
	  if(response) return 1;
		switch(listitem)
		{
			case 0: // Taxi Driver
			{
				SetPVarInt(playerid, "jobSelection", 17);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
				//SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Phai Doi Giam Doc Cong Ty Duyet Don Nghi Viec Sau 2h.");
			}
			case 1: // Craftsman
			{
				SetPVarInt(playerid, "jobSelection", 18);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
			}
			case 2: // Pizza Boy
			{
				SetPVarInt(playerid, "jobSelection", 21);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
			}
			case 3: // Don rac
			{
				SetPVarInt(playerid, "jobSelection", 27);
				//PlayerInfo[playerid][pConnectHours] = 2;
				ShowPlayerDialog(playerid, Job_Dialog, DIALOG_STYLE_LIST, "Xin Viec", "Viec Lam 1\nViec Lam 2", "Okay", "NO");
			}
			}
		}

	if(dialogid == Job_Dialog)
	{
		if(!response) return 1;

	    switch(listitem)
	    {
	        case 0:
	        {
	        	PlayerInfo[playerid][pJob] = GetPVarInt(playerid, "jobSelection");
	        	SendClientMessageEx(playerid, COLOR_YELLOW, "Ban da thay doi cong viec dau tien cua minh!");
			}
	        case 1:
			{
		 		PlayerInfo[playerid][pJob2] = GetPVarInt(playerid, "jobSelection");
		 		SendClientMessageEx(playerid, COLOR_YELLOW, "Ban da thay doi cong viec thu hai cua minh!");
			}
	    }
	}
Reply
#3

Try to do everything backwards to try and identify the problem or try delete single parts of the code.

PS: WTF STOP USING WINDOWS XP!!!!
Reply
#4

poor house can't spend money win 7-8-9-10


Tkas .
Reply
#5

You know , that there is more than god damn windows? I am using Ubuntu 16.04.1 and i am happy with it. It is completly for free.

And by the way, there is no Windows 9 xD
Reply
#6

Quote:
Originally Posted by ongnung147
Посмотреть сообщение
poor house can't spend money win 7-8-9-10


Tkas .
Here in mother Russia you can get good cracked windows 10 for 5$
Don't actually go buy cracked stuff xD Get Linux or something, its free!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)