Pawno Crashing with dialog.. -
iLcke - 25.09.2011
Says it all, i've been trying to figure it out past 5 minutes
Everytime I add this into my script, it stops working.
pawn Код:
if(dialogid == 25)
{
new string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(!response)
{
ShowPlayerDialog(playerid,20,DIALOG_STYLE_LIST,"Los Santos Police Deptartment Locker Room ","Go [ON/OFF] Duty\r\nUniform\r\nEquipment","Select","Close Locker");
return 1;
}
if (listitem == 0)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
return 1;
}
if (listitem == 1)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
GivePlayerWeaponEx(playerid, 29, 2000);
return 1;
}
if (listitem == 2)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
GivePlayerWeaponEx(playerid, 29, 2000);
GivePlayerWeaponEx(playerid, 31, 2500);
return 1;
}
if (listitem == 3)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
GivePlayerWeaponEx(playerid, 29, 2000);
GivePlayerWeaponEx(playerid, 43, 100);
return 1;
}
}
}
}
Ideas? Thanks in advanced!
Re: Pawno Crashing with dialog.. -
Ironboy - 25.09.2011
I didnt test it, anyway try this
pawn Код:
if(dialogid == 25)
{
new string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(!response)
{
ShowPlayerDialog(playerid,20,DIALOG_STYLE_LIST,"Los Santos Police Deptartment Locker Room ","Go [ON/OFF] Duty\r\nUniform\r\nEquipment","Select","Close Locker");
return 1;
}
if (listitem == 0)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
return 1;
}
if (listitem == 1)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
GivePlayerWeaponEx(playerid, 29, 2000);
return 1;
}
if (listitem == 2)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
GivePlayerWeaponEx(playerid, 29, 2000);
GivePlayerWeaponEx(playerid, 31, 2500);
return 1;
}
if (listitem == 3)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 24, 400);
GivePlayerWeaponEx(playerid, 41, 999);
GivePlayerWeaponEx(playerid, 25, 150);
GivePlayerWeaponEx(playerid, 29, 2000);
GivePlayerWeaponEx(playerid, 43, 100);
return 1;
}
}
}
Re: Pawno Crashing with dialog.. -
iLcke - 25.09.2011
nope, didn't work
Re: Pawno Crashing with dialog.. -
[HiC]TheKiller - 25.09.2011
Use the print function every few lines to debug your script and find out where it is stopping. As most of those functions are not default sa-mp functions, they could be crashing the server with something inside their code.
Re : Pawno Crashing with dialog.. -
timaoux - 25.09.2011
pawn Код:
if(dialogid == 25){ new string[128]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); GiveNameSpace(sendername); if(!response) { ShowPlayerDialog(playerid,20,DIALOG_STYLE_LIST,"Los Santos Police Deptartment Locker Room ","Go [ON/OFF] Duty\r\nUniform\r\nEquipment","Select","Close Locker"); return 1; } }if (listitem == 0) { ResetPlayerWeaponsEx(playerid); GivePlayerWeaponEx(playerid, 3, 1); GivePlayerWeaponEx(playerid, 24, 400); GivePlayerWeaponEx(playerid, 41, 999); GivePlayerWeaponEx(playerid, 25, 150); return 1; } if (listitem == 1) { ResetPlayerWeaponsEx(playerid); GivePlayerWeaponEx(playerid, 3, 1); GivePlayerWeaponEx(playerid, 24, 400); GivePlayerWeaponEx(playerid, 41, 999); GivePlayerWeaponEx(playerid, 25, 150); GivePlayerWeaponEx(playerid, 29, 2000); return 1; } if (listitem == 2) { ResetPlayerWeaponsEx(playerid); GivePlayerWeaponEx(playerid, 3, 1); GivePlayerWeaponEx(playerid, 24, 400); GivePlayerWeaponEx(playerid, 41, 999); GivePlayerWeaponEx(playerid, 25, 150); GivePlayerWeaponEx(playerid, 29, 2000); GivePlayerWeaponEx(playerid, 31, 2500); return 1; } if (listitem == 3) { ResetPlayerWeaponsEx(playerid); GivePlayerWeaponEx(playerid, 3, 1); GivePlayerWeaponEx(playerid, 24, 400); GivePlayerWeaponEx(playerid, 41, 999); GivePlayerWeaponEx(playerid, 25, 150); GivePlayerWeaponEx(playerid, 29, 2000); GivePlayerWeaponEx(playerid, 43, 100); return 1; } }
try like that
sorry for 1 line, coz i got some problem to copy and past pawn code :S