/duty command crash the server.
#1

Код:
SA-MP Server: 0.3d
Exception At Address: 0x7704DFE4
Registers:
EAX: 0x00FFFFF8	EBX: 0x01000000	ECX: 0x0018FBD8	EDX: 0x0000000C
ESI: 0x02160000	EDI: 0x00000000	EBP: 0x0018E304	ESP: 0x0018E2F4
EFLAGS: 0x00010246

Stack:
+0000: 0x01000000   0x004B2560   0x0018FCB0   0x00000000
+0010: 0x0018E318   0x751214DD   0x02160000   0x00000000
+0020: 0x01000000   0x0018E354   0x0048DC21   0x02160000
+0030: 0x00000000   0x01000000   0x004B2560   0xFFFFFFFF
+0040: 0x0018FCB0   0x30302B0A   0x0018E32C   0x0018DEC8
+0050: 0x0018E3AC   0x00492028   0x004ACC80   0xFFFFFFFF
+0060: 0x0018FCBC   0x0044E0D9   0x01000000   0x00498417
+0070: 0x004B2560   0xFFFFFFFF   0x0018E37C   0x004B2540
+0080: 0x0018FCB0   0x0018FCBC   0x0018E3BC   0x00497BB8
+0090: 0x0049F300   0x0018FCB0   0x00000103   0x19930520
+00A0: 0x004B2560   0x00000000   0xFFFFFFFF   0x00000000
+00B0: 0x0018E390   0x0018DEC8   0x0018E42C   0x00492028
+00C0: 0x004B0E98   0x00000001   0x0018E3DC   0x00498326
+00D0: 0x0018FCB0   0x0018E524   0x004B2560   0xFFFFFFFF
+00E0: 0x00000000   0x00000000   0x0018E414   0x0048F96C
+00F0: 0x0018E484   0x0018FCB0   0x0018E530   0x0018E524
+0100: 0x004B2560   0x00000000   0x00000000   0x00000000
+0110: 0x00000000   0x00000000   0x00000000   0x004B2560
+0120: 0x0018E438   0x7707B459   0x0018E484   0x0018FCB0
+0130: 0x0018E530   0x0018E524   0x0018FCB0   0x7707B494
This is dialogs what I use..
Код:
	if(dialogid == DUTYMENU)
	{
 		if(response)
		{
			if(listitem == 0) // LSPD Duty
			{
				if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 && playerVariables[playerid][pGroupRank] >= 4)
				{
   					SendClientMessage(playerid, COLOR_GRAD2, " * Officer %s took a Badge and a Gun from his locker.");
					GivePlayerWeapon(playerid, 24, 99999);
					GivePlayerWeapon(playerid, 3, 99999);
				}
			}
			if(listitem == 1) // LSPD Weapons
			{
                ShowPlayerDialog(playerid, DUTYMENU2, DIALOG_STYLE_LIST, "LSPD Weapons","Mase\nKnite Stick\nDeagle\nSpas12\nMP5\nM4\nAK-47\nGranade\nSmoke Bomb\nC4", "Take", "Cancel");
            }
			if(listitem == 2) // LSPD SWAT Uniform
			{
                SetPlayerSkin(playerid, 285);
            }
            if(listitem == 3) // LSPD Uniforms
			{
                ShowPlayerDialog(playerid, DUTYMENU3, DIALOG_STYLE_LIST, "LSPD Uniforms","Cadet\nOfficer 1\nOfficer 2\nSWAT Officer\nSergeant\nCaptain\nAsst. Chief\nChief", "PutOn", "Cancel");
            }
            if(listitem == 4) // LSPD Undercover Uniform
			{
                ShowPlayerDialog(playerid, DUTYMENU4, DIALOG_STYLE_LIST, "LSPD Undercover Uniforms","Rich Mexican\nRich Asian\nRich White Guy\nRich Black Guy\nHomeless Guy\nRich girl\nBusiness Guy\nBuisness Girl\nPoor Woman\nRed-Neck\nDrug Dealer\nGangster\nCivilian", "Undercover", "Cancel");
            }
		}
	}
    if(dialogid == DUTYMENU2)
	{
 		if(response)
		{
			if(listitem == 0) // LSPD Duty
			{
				GivePlayerWeapon(playerid, 41, 100);
			}
			if(listitem == 1) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 3, 1);
			}
			if(listitem == 2) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 24, 21);
			}
			if(listitem == 3) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 27, 32);
			}
			if(listitem == 4) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 29, 200);
			}
			if(listitem == 5) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 31, 100);
			}
			if(listitem == 6) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 30, 100);
			}
			if(listitem == 7) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 16, 4);
			}
			if(listitem == 8) // LSPD Weapons
			{
				GivePlayerWeapon(playerid, 17, 4);
			}
		}
	}
    if(dialogid == DUTYMENU3)
	{
 		if(response)
		{
			if(listitem == 0) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 71);
			}
			if(listitem == 1) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 265);
			}
			if(listitem == 2) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 280);
			}
			if(listitem == 3) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 267);
			}
			if(listitem == 4) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 282);
			}
			if(listitem == 5) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 266);
			}
			if(listitem == 6) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 288);
			}
			if(listitem == 7) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 283);
			}
		}
	}
    if(dialogid == DUTYMENU4)
	{
 		if(response)
		{
			if(listitem == 0) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 223);
			}
			if(listitem == 1) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 120);
			}
			if(listitem == 2) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 240);
			}
			if(listitem == 3) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 296);
			}
			if(listitem == 4) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 137);
			}
			if(listitem == 5) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 214);
			}
			if(listitem == 6) // LSPD Uniforms
			{
				SetPlayerSkin(playerid, 294);
			}
			if(listitem == 7) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 150);
			}
			if(listitem == 8) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 201);
			}
			if(listitem == 9) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 162);
			}
			if(listitem == 10) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 29);
			}
			if(listitem == 11) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 270);
			}
			if(listitem == 12) //LSPD Uniforms
			{
				SetPlayerSkin(playerid, 59);
			}
		}
	}
Код:
CMD:duty(playerid, params[]) {
	if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 && playerVariables[playerid][pGroupRank] >= 4)
	{
		if(IsPlayerInRangeOfPoint(playerid, 7.0, 263.8386,109.0965,1004.6172))
		{
			ShowPlayerDialog(playerid, DUTYMENU, DIALOG_STYLE_LIST, "LSPD Menu","Duty\nWeapons\nSWAT\nUniform\nUndercover", "Select", "Cancel");
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD2, "You are not in a locker room !");
			return 1;
		}
	}
	return 1;
}
This is command ....
Reply
#2

where is your if(!respones) ??

You have no option for "Cancel"
Reply
#3

Its on OnDialogResponse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)