13.10.2012, 02:20
If someone can fix all the brackets in this part of the script, which causes a pawno crash, I will spam them with rep.
Code:
if(dialogid == 51) { if(response) { if (listitem == 1) { SafeResetPlayerWeapons(playerid); SafeGivePlayerWeapon(playerid, 3, 1); SafeGivePlayerWeapon(playerid, 23, 100); SafeGivePlayerWeapon(playerid, 41, 400); SafePlayerSetArmour(playerid, 100); SetPlayerHealth(playerid, 100); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s has suited himself up with the spy equipment.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } } } } else if (listitem == 2) { SafeResetPlayerWeapons(playerid); SafeGivePlayerWeapon(playerid, 3, 1); SafeGivePlayerWeapon(playerid, 22, 100); SafeGivePlayerWeapon(playerid, 41, 400); SafePlayerSetArmour(playerid, 100); SetPlayerHealth(playerid, 100); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s has suited himself up with the Agent equipment.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } } } } else if (listitem == 3) { SafeResetPlayerWeapons(playerid); SafeGivePlayerWeapon(playerid, 3, 1); SafeGivePlayerWeapon(playerid, 24, 100); SafeGivePlayerWeapon(playerid, 41, 400); SafeGivePlayerWeapon(playerid, 29, 200); SafePlayerSetArmour(playerid, 100); SetPlayerHealth(playerid, 100); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s has suited himself up with the Special Agent equipment.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } } } } else if (listitem == 4) { SafeResetPlayerWeapons(playerid); SafeGivePlayerWeapon(playerid, 3, 1); SafeGivePlayerWeapon(playerid, 24, 100); SafeGivePlayerWeapon(playerid, 41, 400); SafeGivePlayerWeapon(playerid, 29, 200); SafeGivePlayerWeapon(playerid, 27, 50); SafePlayerSetArmour(playerid, 100); SetPlayerHealth(playerid, 100); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s has suited himself up with the Coordinator of Intelligence equipment.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } } } } else if (listitem == 5) { SafeResetPlayerWeapons(playerid); SafeGivePlayerWeapon(playerid, 3, 1); SafeGivePlayerWeapon(playerid, 24, 100); SafeGivePlayerWeapon(playerid, 41, 400); SafeGivePlayerWeapon(playerid, 29, 200); SafeGivePlayerWeapon(playerid, 27, 50); SafeGivePlayerWeapon(playerid, 31, 500); SafePlayerSetArmour(playerid, 100); SetPlayerHealth(playerid, 100); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s has suited himself up with the Deputy Director General equipment.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } } } } else if (listitem == 6) { SafeResetPlayerWeapons(playerid); SafeGivePlayerWeapon(playerid, 3, 1); SafeGivePlayerWeapon(playerid, 24, 100); SafeGivePlayerWeapon(playerid, 41, 400); SafeGivePlayerWeapon(playerid, 29, 200); SafeGivePlayerWeapon(playerid, 27, 50); SafeGivePlayerWeapon(playerid, 31, 500); SafePlayerSetArmour(playerid, 100); SetPlayerHealth(playerid, 100); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s has suited himself up with the Director General equipment.", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); } } } } } }