16.03.2017, 09:41
What is wrong? I try to register the account, but it just keeps switching from dialog and does not respawn
http://*********/bnrRAJH20bo
Watch this video, the problem
Can someone tell me why this is happening?
Defines
OnDialogResponse
http://*********/bnrRAJH20bo
Watch this video, the problem
Can someone tell me why this is happening?
Defines
Код:
#define LOGIN_DIALOG 1 #define REGISTER_DIALOG 2 #define RENTCAR_DIALOG 3 #define RENTBIKE_DIALOG 4 #define WITHDRAW_DIALOG 5 #define DEPOSIT_DIALOG 6 #define WALK_DIALOG 7 #define BUY_DIALOG 8 #define NEON_DIALOG 9 #define RADIO_DIALOG 10 #define MASK_DIALOG 11 #define AGE_DIALOG 12 #define NUMBER_DIALOG 13 #define ROB_DIALOG 14 #define CCTV_DIALOG 15 #define WEAR_DIALOG 16 #define TOG_DIALOG 17 #define HOTWIRE_DIALOG 18 #define WEAPON_DIALOG 19 #define TEST_DIALOG 50//defined ID + 10 (example if defined 5 = 5,6,7,8,9,10,11,12,13,14,15 and 16) #define GUIDE_DIALOG 61//leave untill 70... #define MSG_DIALOG 100//Don't add ondialogresponse for this
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == WEAPON_DIALOG) { if(response) { new buyingweapon = WeaponShop[playerid]; switch (buyingweapon)//to be done { case 0: { if(GetPlayerPCash(playerid)>=700 && PlayerInfo[playerid][pLevel] > 1) { GivePlayerWeaponEx(playerid,22,150); GivePlayerPCash(playerid, - 700); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 500; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 1: { if(GetPlayerPCash(playerid)>=3000 && PlayerInfo[playerid][pLevel] > 2) { GivePlayerWeaponEx(playerid,24,100); GivePlayerPCash(playerid, - 3000); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 2100; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 2: { if(GetPlayerPCash(playerid)>=700 && PlayerInfo[playerid][pLevel] > 2) { GivePlayerWeaponEx(playerid,25,50); GivePlayerPCash(playerid, - 700); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 500; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 3: { if(GetPlayerPCash(playerid)>=1000 && PlayerInfo[playerid][pLevel] > 3) { GivePlayerWeaponEx(playerid,26,50); GivePlayerPCash(playerid, - 1000); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 700; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 4: { if(GetPlayerPCash(playerid)>=1000 && PlayerInfo[playerid][pLevel] > 3) { GivePlayerWeaponEx(playerid,33,60); GivePlayerPCash(playerid, - 1000); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 700; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 5: { if(GetPlayerPCash(playerid)>=1500 && PlayerInfo[playerid][pLevel] > 4) { GivePlayerWeaponEx(playerid,28,200); GivePlayerPCash(playerid, - 1500); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 1100; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 6: { if(GetPlayerPCash(playerid)>=1500 && PlayerInfo[playerid][pLevel] > 4) { GivePlayerWeaponEx(playerid,32,200); GivePlayerPCash(playerid, - 1500); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 1100; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 7: { if(GetPlayerPCash(playerid)>=2000 && PlayerInfo[playerid][pLevel] > 4) { GivePlayerWeaponEx(playerid,29,200); GivePlayerPCash(playerid, - 2000); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 1500; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 8: { if(GetPlayerPCash(playerid)>=2000 && PlayerInfo[playerid][pLevel] > 5) { GivePlayerWeaponEx(playerid,30,250); GivePlayerPCash(playerid, - 2000); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 1500; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 9: { if(GetPlayerPCash(playerid)>=6000 && PlayerInfo[playerid][pLevel] > 7) { GivePlayerWeaponEx(playerid,31,250); GivePlayerPCash(playerid, - 6000); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 4000; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 10: { if(GetPlayerPCash(playerid)>=40000 && PlayerInfo[playerid][pLevel] > 9) { GivePlayerWeaponEx(playerid,34,50); GivePlayerPCash(playerid, - 40000); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 5000; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } case 11: { if(GetPlayerPCash(playerid)>=700 && PlayerInfo[playerid][pLevel] > 1) { SetPlayerArmourEx(playerid,75); GivePlayerPCash(playerid, - 700); if(PlayerInfo[playerid][pApproved] == 1) { BizzInfo[HouseEntered[playerid]][bTill] += 500; BizzInfo[HouseEntered[playerid]][bProducts] --; } TogglePlayerControllable(playerid,true); } else { SendClientMessage(playerid,COLOR_LIGHTRED,"You do not have enough money, or not high enough level !"); TogglePlayerControllable(playerid,true); } } } } } if (dialogid == CALC_1) { switch(listitem) { case 0: { SendClientMessage(playerid,-1," You selected: Multiply ( * )."); Calc_Option[playerid] = 1; // Multiply ShowPlayerDialog(playerid, CALC_2, DIALOG_STYLE_INPUT, "Calculator - Choose a number", "Please choose a number you would like to multiply.", "Choose", "Cancel"); } case 1: { SendClientMessage(playerid,-1," You selected: Plus ( + )."); Calc_Option[playerid] = 2; // Plus ShowPlayerDialog(playerid, CALC_2, DIALOG_STYLE_INPUT, "Calculator - Choose a number", "Please choose a number you would like to plus.", "Choose", "Cancel"); } case 2: { SendClientMessage(playerid,-1," You selected: Divide ( / )."); Calc_Option[playerid] = 3; // Divide ShowPlayerDialog(playerid, CALC_2, DIALOG_STYLE_INPUT, "Calculator - Choose a number", "Please choose a number you would like to divide.", "Choose", "Cancel"); } case 3: { SendClientMessage(playerid,-1," You selected: Substract ( - )."); Calc_Option[playerid] = 4; // Substract ShowPlayerDialog(playerid, CALC_2, DIALOG_STYLE_INPUT, "Calculator - Choose a number", "Please choose a number you would like to substract.", "Choose", "Cancel"); } } return 1; } if (dialogid == CALC_2) { if(IsNumeric(inputtext)) { Calc_Numb1[playerid] = strval(inputtext); ShowPlayerDialog(playerid, CALC_3, 1, "Calculator - Choose a number", "Please choose the second number you would like for finishing the operation", "Choose", "Cancel"); return 1; } } if (dialogid == CALC_3) { if(IsNumeric(inputtext)) { new sz_String[128]; Calc_Numb2[playerid] = strval(inputtext); if(Calc_Option[playerid] == 1) // Multiply { Calc_Result[playerid] = Calc_Numb1[playerid] * Calc_Numb2[playerid]; format(sz_String,128," Operation : %d * %d | Result: %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]); } if(Calc_Option[playerid] == 2) // Plus { Calc_Result[playerid] = Calc_Numb1[playerid] + Calc_Numb2[playerid]; format(sz_String,128," Operation : %d + %d | Result: %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]); } if(Calc_Option[playerid] == 3) // Divide { Calc_Result[playerid] = Calc_Numb1[playerid] / Calc_Numb2[playerid]; format(sz_String,128," Operation : %d / %d | Result: %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]); } if(Calc_Option[playerid] == 4) // Substract { Calc_Result[playerid] = Calc_Numb1[playerid] - Calc_Numb2[playerid]; format(sz_String,128," Operation : %d - %d | Result: %d", Calc_Numb1[playerid], Calc_Numb2[playerid], Calc_Result[playerid]); } SendClientMessage(playerid,-1,sz_String); } return 1; } if (dialogid == TOG_DIALOG) { if(response) { if(listitem == 0) { if(BlockNews[playerid] == 0) { BlockNews[playerid] = 1; } else { BlockNews[playerid] = 0; } } else if(listitem == 1) { if(BlockBot[playerid] == 0) { BlockBot[playerid] = 1; } else { BlockBot[playerid] = 0; } } else if(listitem == 2) { if(BlockHelperChat[playerid] == 0) { BlockHelperChat[playerid] = 1; } else { BlockHelperChat[playerid] = 0; } } else if(listitem == 3) { if(BlockAdminChat[playerid] == 0) { BlockAdminChat[playerid] = 1; } else { BlockAdminChat[playerid] = 0; } } else if(listitem == 4) { if(BlockFamily[playerid] == 0) { BlockFamily[playerid] = 1; } else { BlockFamily[playerid] = 0; } } else if(listitem == 5) { if(BlockRadio[playerid] == 0) { BlockRadio[playerid] = 1; } else { BlockRadio[playerid] = 0; } } else if(listitem == 6) { if(BlockRadio2[playerid] == 0) { BlockRadio2[playerid] = 1; } else { BlockRadio2[playerid] = 0; } } else if(listitem == 7) { if(HidePM[playerid] == 0) { HidePM[playerid] = 1; } else { HidePM[playerid] = 0; } } else if(listitem == 8) { if(TogB[playerid] == 0) { TogB[playerid] = 1; } else { TogB[playerid] = 0; } } else if(listitem == 9) { if(PhoneOff[playerid] == 0) { PhoneOff[playerid] = 1; } else { PhoneOff[playerid] = 0; } } else if(listitem == 10) { if(FPD[playerid] == 0) { FPD[playerid] = 1; if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { new p = GetPlayerVehicleID(playerid); obj[playerid] = CreatePlayerObject(playerid,19300, 0.0000, -1282.9984, 10.1493, 0.0000, -1, -1, 100); AttachPlayerObjectToVehicle(playerid,obj[playerid],p,-0.314999, -0.195000, 0.510000, 0.000000, 0.000000, 0.000000); AttachCameraToPlayerObject(playerid,obj[playerid]); SetPVarInt(playerid,"fpd",1); } } else { FPD[playerid] = 0; if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { SetCameraBehindPlayer(playerid); DestroyPlayerObject(playerid,obj[playerid]); SetPVarInt(playerid,"fpd",0); } } } new mstring[512]; new string[512]; if(BlockNews[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}News (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}News (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(BlockBot[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}LSL-RP Bot (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}LSL-RP Bot (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(BlockHelperChat[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Helper Chat (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Helper Chat (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(BlockAdminChat[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Admin Chat (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Admin Chat (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(BlockFamily[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Family Chat (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Family Chat (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(BlockRadio[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Radio (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Radio (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(BlockRadio2[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Show (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Show (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(HidePM[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Private Messages (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Private Messages (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(TogB[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Local ooc chat(/b) (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Local ooc chat(/b) (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(PhoneOff[playerid] == 0) { format(mstring,sizeof(mstring), "{55EE55}Mobile Phone (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Mobile Phone (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); if(FPD[playerid] == 1) { format(mstring,sizeof(mstring), "{55EE55}First person driving (ON)\n"); } else { format(mstring,sizeof(mstring), "{990000}Firtst person driving (OFF)\n"); } strcat(string, mstring, sizeof(mstring)); ShowPlayerDialog(playerid,TOG_DIALOG,DIALOG_STYLE_LIST,"{448844}Toggle:",string,"Tog","Close"); } return 1; } if (dialogid == WEAR_DIALOG) { if (listitem == 0) { if(IsPlayerAttachedObjectSlotUsed(playerid, SLOT)) { return 1; } switch (SunglassesOn[playerid]) { case 0: { SunglassesOn[playerid] = 1; new skin = GetPlayerSkin(playerid); SetPlayerAttachedObject(playerid, SLOT, 19022, 2, SunglassesSkinOffSet[skin][0], SunglassesSkinOffSet[skin][1], SunglassesSkinOffSet[skin][2], SunglassesSkinOffSet[skin][3], SunglassesSkinOffSet[skin][4], SunglassesSkinOffSet[skin][5]); } case 1: { SunglassesOn[playerid] = 0; RemovePlayerAttachedObject(playerid, SLOT); } } } else if (listitem == 1) { if(IsPlayerAttachedObjectSlotUsed(playerid, SLOT)) { return 1; } switch (Hat[playerid]) { case 0: { Hat[playerid] = 1; new skin = GetPlayerSkin(playerid); SetPlayerAttachedObject(playerid, SLOT, 18925, 2, HatSkinOffSet[skin][0], HatSkinOffSet[skin][1], HatSkinOffSet[skin][2], HatSkinOffSet[skin][3], HatSkinOffSet[skin][4], HatSkinOffSet[skin][5]); } case 1: { Hat[playerid] = 0; RemovePlayerAttachedObject(playerid, SLOT); } } } else if (listitem == 2) { if(IsPlayerAttachedObjectSlotUsed(playerid, SLOT)) { return 1; } switch (Cap[playerid]) { case 0: { Cap[playerid] = 1; new skin = GetPlayerSkin(playerid); SetPlayerAttachedObject(playerid, SLOT, 18939, 2, CapSkinOffSet[skin][0], CapSkinOffSet[skin][1], CapSkinOffSet[skin][2], CapSkinOffSet[skin][3], CapSkinOffSet[skin][4], CapSkinOffSet[skin][5]); } case 1: { Cap[playerid] = 0; RemovePlayerAttachedObject(playerid, SLOT); } } } else if (listitem == 3) { if(IsPlayerAttachedObjectSlotUsed(playerid, SLOT)) { return 1; } switch (HockeyMask[playerid]) { case 0: { HockeyMask[playerid] = 1; new skin = GetPlayerSkin(playerid); SetPlayerAttachedObject(playerid, SLOT, 19036, 2, SunglassesSkinOffSet[skin][0], SunglassesSkinOffSet[skin][1], SunglassesSkinOffSet[skin][2], SunglassesSkinOffSet[skin][3], SunglassesSkinOffSet[skin][4], SunglassesSkinOffSet[skin][5]); } case 1: { HockeyMask[playerid] = 0; RemovePlayerAttachedObject(playerid, SLOT); } } } else if (listitem == 4) { if(IsPlayerAttachedObjectSlotUsed(playerid, SLOT)) { return 1; } switch (Backpack[playerid]) { case 0: { Backpack[playerid] = 1; SetPlayerAttachedObject(playerid, SLOT, 3026, 1, -0.135905, -0.035217, -0.004736, 0.000000, 0.000000, 0.000000, 0.938511, 1.195391, 1.403976); } case 1: { Backpack[playerid] = 0; RemovePlayerAttachedObject(playerid, SLOT); } } } else if (listitem == 5) { if(IsPlayerAttachedObjectSlotUsed(playerid, SLOT)) { return 1; } switch (Hair[playerid]) { case 0: { Hair[playerid] = 1; new skin = GetPlayerSkin(playerid); SetPlayerAttachedObject(playerid, SLOT, 19077, 2, HairSkinOffSet[skin][0], HairSkinOffSet[skin][1], HairSkinOffSet[skin][2], HairSkinOffSet[skin][3], HairSkinOffSet[skin][4], HairSkinOffSet[skin][5], HairSkinOffSet[skin][8], HairSkinOffSet[skin][8], HairSkinOffSet[skin][8]); } case 1: { Hair[playerid] = 0; RemovePlayerAttachedObject(playerid, SLOT); } } } } if (dialogid == CCTV_DIALOG) { switch(listitem) { case 0: { //idlewood gas SetPlayerCameraPos(playerid, 1929.6409,-1787.5817,16.9194); SetPlayerCameraLookAt(playerid, 1938.9924,-1774.9166,13.3828); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Idlewood Gas Station"); } case 1: {//els cluckin bell SetPlayerCameraPos(playerid, 2419.4907,-1493.9268,29.2938); SetPlayerCameraLookAt(playerid, 2392.5156,-1483.2542,23.8281); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now East Los Santos Cluckin' Bell"); } case 2: {//pig pen SetPlayerCameraPos(playerid, 2405.7546,-1228.0444,28.3344); SetPlayerCameraLookAt(playerid, 2425.3916,-1222.4506,25.3696); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now The Pig Pen"); } case 3: {//vine gas SetPlayerCameraPos(playerid, 1001.4344,-931.0976,45.5398); SetPlayerCameraLookAt(playerid, 1007.1722,-938.3459,42.1797); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Vinewood Gas Station"); } case 4: {//richman SetPlayerCameraPos(playerid, 830.2877,-867.7665,72.7912); SetPlayerCameraLookAt(playerid, 883.6164,-863.8794,81.8592); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Richman District"); } case 5: {//donuts SetPlayerCameraPos(playerid, 1042.8719,-1339.3459,18.2252); SetPlayerCameraLookAt(playerid, 1029.6747,-1332.3359,13.3857); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Donut Shop"); } case 6: {//unity station SetPlayerCameraPos(playerid, 1750.6959,-1883.2157,29.2983); SetPlayerCameraLookAt(playerid, 1800.9741,-1922.4568,13.3914); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Unity Station"); } case 7: {//airport SetPlayerCameraPos(playerid, 1800.9741,-1922.4568,13.3914); SetPlayerCameraLookAt(playerid, 1561.8698,-2241.1733,13.5469); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Airport"); } case 8: {//el corona SetPlayerCameraPos(playerid, 1851.4417,-2096.7095,17.0835); SetPlayerCameraLookAt(playerid, 1920.1039,-2107.6667,13.5932); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now El Corona"); } case 9: {//lspd SetPlayerCameraPos(playerid, 1553.7131,-1651.9595,28.3956); SetPlayerCameraLookAt(playerid, 1530.2495,-1696.9764,13.3828); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Los Santos Police Department"); }case 10: {//alhambra SetPlayerCameraPos(playerid, 1835.9019,-1669.9611,27.4508); SetPlayerCameraLookAt(playerid, 1812.1228,-1691.5217,13.5469); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Alhambra Club"); } case 11: {//fire dept SetPlayerCameraPos(playerid, 1799.2147,-1703.9880,34.0647); SetPlayerCameraLookAt(playerid, 1752.9244,-1687.8568,13.3828); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Fire Department"); } case 12: {//ocean docks SetPlayerCameraPos(playerid, 2466.7864,-2514.6873,28.3480); SetPlayerCameraLookAt(playerid, 2491.0352,-2611.6235,13.6484); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Ocean Docks"); } case 13: {//stadium SetPlayerCameraPos(playerid, 2706.0125,-1688.9443,33.8410); SetPlayerCameraLookAt(playerid, 2660.1812,-1689.0131,9.3241); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Stadium"); } case 14: {//junkyard SetPlayerCameraPos(playerid, 2159.7380,-1988.0378,32.4801); SetPlayerCameraLookAt(playerid, 2110.8904,-1970.8507,13.5469); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Junkyard"); } case 15: {//las colinas SetPlayerCameraPos(playerid, 2500.8794,-1079.0529,67.2574); SetPlayerCameraLookAt(playerid, 2411.5652,-1098.0085,39.9157); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Las Colinas"); } case 16: {//bank SetPlayerCameraPos(playerid, 1453.7554,-1014.3506,26.6071); SetPlayerCameraLookAt(playerid, 1475.0422,-1030.7694,23.6563); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now The Bank"); } case 17: {//all saints SetPlayerCameraPos(playerid, 1175.2284,-1318.4988,19.4383); SetPlayerCameraLookAt(playerid, 1188.6746,-1332.0853,13.5611); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now All Saints Hospital"); } case 18: {//county general SetPlayerCameraPos(playerid, 2043.4399,-1409.4958,23.1193); SetPlayerCameraLookAt(playerid, 2023.9667,-1421.6927,16.9922); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now County General Hospital"); } case 19: {//pier SetPlayerCameraPos(playerid, 388.1503,-2029.3112,34.7302); SetPlayerCameraLookAt(playerid, 365.5535,-2056.6914,15.4035); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Beach Pier"); } case 20: {//marina burger SetPlayerCameraPos(playerid, 809.6459,-1625.6487,25.8672); SetPlayerCameraLookAt(playerid, 826.7888,-1606.1116,13.3828); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Beach Burger Shot"); } case 21: {//willowfield gunshop SetPlayerCameraPos(playerid, 2402.6941,-1982.7827,18.5529); SetPlayerCameraLookAt(playerid, 2375.2446,-1964.9336,13.5469); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Willowfield Ammunation"); } case 22: {//transfenders SetPlayerCameraPos(playerid, 1056.5281,-1028.0072,37.2494); SetPlayerCameraLookAt(playerid, 1025.7711,-1033.6661,31.7793); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Transfenders Tuning Garage"); } case 23: {//loco low SetPlayerCameraPos(playerid, 2651.4275,-2016.1860,17.6371); SetPlayerCameraLookAt(playerid, 2641.6653,-2038.6328,13.5540); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Loco Low Tuning Garage"); } case 24: {//san news SetPlayerCameraPos(playerid, 1782.2155,-1262.2207,23.4531); SetPlayerCameraLookAt(playerid, 1791.6499,-1290.3684,13.5897); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now SAN News"); } case 25: {//phone company SetPlayerCameraPos(playerid, 1639.1115,-1171.9229,30.0229); SetPlayerCameraLookAt(playerid, 1618.4185,-1154.4888,24.0781); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Phone Company Department"); } case 26: {//gun factory SetPlayerCameraPos(playerid, 2201.3623,-2269.1382,20.6317); SetPlayerCameraLookAt(playerid, 2169.0425,-2281.8733,13.4625); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Ocean Docks Weapon Factory"); } case 27: {//city hall SetPlayerCameraPos(playerid, 1466.7067,-1748.9220,36.1786); SetPlayerCameraLookAt(playerid, 1498.5122,-1734.3274,13.3828); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now City Hall"); } case 28: {//ganton binco SetPlayerCameraPos(playerid, 2254.3511,-1668.0229,19.1875); SetPlayerCameraLookAt(playerid, 2231.3054,-1646.0588,15.4882); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Binco"); } case 29: {//hfp SetPlayerCameraPos(playerid, 1749.7979,-1531.4858,18.1810); SetPlayerCameraLookAt(playerid, 1775.5143,-1540.9890,9.4467); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now High Facility Prison"); } case 30: {//ganton gym SetPlayerCameraPos(playerid, 2230.9734,-1722.2426,22.8594); SetPlayerCameraLookAt(playerid, 2209.0203,-1738.9851,13.4020); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Ganton Gym"); } case 31: {//pizza SetPlayerCameraPos(playerid, 2094.2021,-1788.5818,27.3048); SetPlayerCameraLookAt(playerid, 2101.9229,-1809.1698,13.5547); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Idlewood Pizza Stack"); } case 32: {//24/7 city hall SetPlayerCameraPos(playerid, 1466.7067,-1748.9220,36.1786); SetPlayerCameraLookAt(playerid, 1498.5122,-1734.3274,13.3828); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now City Hall General Shop"); } case 33: {//trucker hq SetPlayerCameraPos(playerid, 2518.6831,-2099.6052,25.6954); SetPlayerCameraLookAt(playerid, 2436.9863,-2085.1050,13.5469); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Willowfield Truck Depot"); } case 34: {//downtown ammunation SetPlayerCameraPos(playerid, 1365.7726,-1287.7145,22.2070); SetPlayerCameraLookAt(playerid, 1357.1219,-1272.0902,13.3828); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Downtown Ammunation"); } case 35: {//graveyard SetPlayerCameraPos(playerid, 823.1432,-1110.7069,33.8828); SetPlayerCameraLookAt(playerid, 892.5822,-1098.5011,23.5000); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Graveyard"); } case 36: {//verdant bluff SetPlayerCameraPos(playerid, 1124.9480,-2041.6812,75.8093); SetPlayerCameraLookAt(playerid, 1175.8365,-2030.4137,69.0078); SendClientMessage(playerid, TEAM_CYAN_COLOR, "CCTV: Watching now Verdant Bluffs"); } } oldvw[playerid] = GetPlayerVirtualWorld(playerid); oldint[playerid] = GetPlayerInterior(playerid); SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 0); SetPVarInt(playerid, "CCTVUse", 1); SendClientMessage(playerid, COLOR_RED, "HINT: Use /cctvoff to finish using the CCTV camera"); SendClientMessage(playerid, COLOR_RED, "HINT: The CCTV is muted it can't hear speech or sound."); return 1; } if (dialogid == LOGIN_DIALOG) { if (response) { if(!strlen(inputtext)) { SendClientMessage(playerid, COLOR_GRAD2, " Please input a password !"); ShowPlayerDialog(playerid, LOGIN_DIALOG, 1, "{3399CC}Information", "{FFFFFF}You have an account here, please type below your password to login.", "Login", "Quit"); return 1; } /*new string[128]; format(string, sizeof(string), "users/%s.ini", PlayerName(playerid)); if(!fexist(string)) { SendClientMessage(playerid, COLOR_RED, "That Username is not taken, please use /register [password]."); return 1; }*/ if(!AccountExists(PlayerName(playerid))) { ShowPlayerDialog(playerid, REGISTER_DIALOG, 1, "{3399CC}Information", "{FFFFFF}You don't have an account here, please type below your password to register.", "Register", "Exit"); return 1; } OnPlayerLogin(playerid,inputtext); return 1; } else { Kick(playerid); /*SendClientMessage(playerid,COLOR_LIGHTBLUE,"____________________________________________________"); SendClientMessage(playerid,COLOR_LIGHTBLUE," Los Santos Life Roleplay:"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO]: You have an account here, please type /login <password> to login."); SendClientMessage(playerid,COLOR_LIGHTBLUE,"____________________________________________________");*/ } return 1; } else if (dialogid == REGISTER_DIALOG) { if (response) { if(!strlen(inputtext)) { SendClientMessage(playerid, COLOR_GRAD2, " Please input a password !"); ShowPlayerDialog(playerid, REGISTER_DIALOG, 1, "{3399CC}Information", "{FFFFFF}You don't have an account here, please type below your password to register.", "Register", "Quit"); return 1; } /*new playername[24], string[128]; GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "users/%s.ini", playername);*/ PlayerInfo[playerid][pCash] = GetPlayerPCash(playerid); OnPlayerRegister(playerid, inputtext); ShowPlayerDialog(playerid, LOGIN_DIALOG, 1, "{3399CC}Information", "{FF0000}You've registered an account!\n{FFFFFF}You have an account here, please type below your password to login.", "Login", "Quit"); strmid(PlayerInfo[playerid][pPassword], inputtext, 0, strlen(inputtext), 255); PlayerInfo[playerid][pLevel] = 1; return 1; } else { Kick(playerid); /*SendClientMessage(playerid,COLOR_LIGHTBLUE,"____________________________________________________"); SendClientMessage(playerid,COLOR_LIGHTBLUE," Los Santos Life Roleplay:"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO]: You don't have an account here, please type /register <password> to register."); SendClientMessage(playerid,COLOR_LIGHTBLUE,"____________________________________________________");*/ } return 1; } else if (dialogid == RENTBIKE_DIALOG) { if (response) { if(IsPlayerConnected(playerid)) { if(GetPlayerVehicleID(playerid) >= 112 && GetPlayerVehicleID(playerid) <= 130) { new hirefee = 75; if (GetPlayerPCash(playerid) < SBizzInfo[0][sbEntranceCost] && PlayerInfo[playerid][pDonateRank] < 1) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !"); RemovePlayerFromVehicle(playerid); return 1; } if(HireCar[playerid] != 299) { SendClientMessage(playerid, COLOR_GREY, "You need unrent your current car/bike/boat first !"); RemovePlayerFromVehicle(playerid); return 1; } foreach (Player,i) { if(HireCar[i] == GetPlayerVehicleID(playerid)) { SendClientMessage(playerid, COLOR_GREY, " Someone already rents this car !"); RemovePlayerFromVehicle(playerid); return 1; } } if(PlayerInfo[playerid][pDonateRank] < 1) { GivePlayerPCash(playerid,-SBizzInfo[1][sbEntranceCost]); } SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost]; ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]); SBizzInfo[0][sbProducts]--; HireCar[playerid] = GetPlayerVehicleID(playerid); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); new string[128]; format(string, sizeof(string), "~w~Don't forget to ~b~/unrentbike",hirefee); TogglePlayerControllable(playerid, 1); GameTextForPlayer(playerid, string, 5000, 3); } } } else if (!response) { VehAsk[playerid] = 0; TogglePlayerControllable(playerid,true); RemovePlayerFromVehicle(playerid); } return 1; } else if (dialogid == HOTWIRE_DIALOG) { if(IsPlayerConnected(playerid)) { if (response) { if(GetPlayerVehicleID(playerid) >= 200 && GetPlayerVehicleID(playerid) <= 203) { if(GetPlayerPCash(playerid) <= (GetPlayerVehicleID(playerid)-199)*12000) { SendClientMessage(playerid, COLOR_RED, "You don't have enough money"); RemovePlayerFromVehicle(playerid); return 1; } if(PlayerInfo[playerid][pHotwireSkill] >= GetPlayerVehicleID(playerid)-199) { SendClientMessage(playerid, COLOR_RED, "Your skill is already higher than this one!"); RemovePlayerFromVehicle(playerid); return 1; } HotWireLearning[playerid] = 250; SendClientMessage(playerid, COLOR_RED, "Please wait untill you learn how to hotwire this vehicle now... To cancel type /exit."); TogglePlayerControllable(playerid, 0); } } else { RemovePlayerFromVehicle(playerid); } } return 1; } else if (dialogid == RENTCAR_DIALOG) { if(IsPlayerConnected(playerid)) { if (response) { if(GetPlayerVehicleID(playerid) >= 1 && GetPlayerVehicleID(playerid) <= 9 || GetPlayerVehicleID(playerid) >= 135 && GetPlayerVehicleID(playerid) <= 154) { new hirefee = 75; if (GetPlayerPCash(playerid) < SBizzInfo[1][sbEntranceCost] && PlayerInfo[playerid][pDonateRank] < 2) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !"); return 1; } if(HireCar[playerid] != 299) { SendClientMessage(playerid, COLOR_GREY, "You need unrent your current car/bike/boat first !"); return 1; } foreach (Player,i) { if(HireCar[i] == GetPlayerVehicleID(playerid)) { SendClientMessage(playerid, COLOR_GREY, " Someone already rents this car !"); return 1; } } if(PlayerInfo[playerid][pDonateRank] < 2) { GivePlayerPCash(playerid,-SBizzInfo[1][sbEntranceCost]); } SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost]; ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]); SBizzInfo[1][sbProducts]--; HireCar[playerid] = GetPlayerVehicleID(playerid); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); new string[128]; format(string, sizeof(string), "~w~Don't forget to ~r~/unrentcar.",hirefee); SendClientMessage(playerid, COLOR_YELLOW2, "You can start the engine up now !"); GameTextForPlayer(playerid, string, 5000, 3); return 1; } } else if (!response) { VehAsk[playerid] = 0; TogglePlayerControllable(playerid,true); RemovePlayerFromVehicle(playerid); } } return 1; } else if(dialogid == WITHDRAW_DIALOG) { if(response) { if(!IsNumeric(inputtext)) { SendClientMessage(playerid, COLOR_WHITE, "Inputed value must be numeric and above 0!"); return 1; } new withdraw = strval(inputtext); if(withdraw < 1) { SendClientMessage(playerid,COLOR_GREY,"Inputed value must be numeric and above 0!"); return 1; } if(PlayerInfo[playerid][pAccount] < withdraw) { SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!"); return 1; } GivePlayerPCash(playerid,withdraw); new string[128]; PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-withdraw; format(string, sizeof(string), "{FFFFFF}Old balance: {33CCFF}%d{FFFFFF}\nWithdraw: {33CCFF}%d{FFFFFF}\nNew balance:{33CCFF}%d{FFFFFF}",PlayerInfo[playerid][pAccount]+withdraw,withdraw,PlayerInfo[playerid][pAccount]); ShowPlayerDialog(playerid,MSG_DIALOG,0,"{33CCFF}Withdraw",string,"Ok",""); return 1; } return 1; } else if(dialogid == DEPOSIT_DIALOG) { if(response) { if(!IsNumeric(inputtext)) { SendClientMessage(playerid, COLOR_WHITE, "Inputed value must be numeric and above 0!"); return 1; } new deposit = strval(inputtext); if(deposit < 1) { SendClientMessage(playerid,COLOR_GREY,"Inputed value must be numeric and above 0!"); return 1; } if(GetPlayerPCash(playerid) < deposit) { SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!"); return 1; } GivePlayerPCash(playerid,-deposit); new string[128]; PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]+deposit; format(string, sizeof(string), "{FFFFFF}Old balance: {33CCFF}%d{FFFFFF}\nDeposit: {33CCFF}%d{FFFFFF}\nNew balance:{33CCFF}%d{FFFFFF}",PlayerInfo[playerid][pAccount]-deposit,deposit,PlayerInfo[playerid][pAccount]); ShowPlayerDialog(playerid,MSG_DIALOG,0,"{33CCFF}Deposit",string,"Ok",""); return 1; } return 1; } else if(dialogid == WALK_DIALOG) { if(response) { SetPlayerWalkingStyle(playerid, listitem); SendClientMessage(playerid, COLOR_GREEN, "Walking style changed!"); } } else if(dialogid == GUIDE_DIALOG) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid,GUIDE_DIALOG+1,DIALOG_STYLE_LIST,"Locations","License registration (DMV)\nPolice department\nGas station\nMaterials factory\nCellphone company\nCancel","Locate","Cancel"); } else if(listitem == 1) { ShowPlayerDialog(playerid,GUIDE_DIALOG+2,DIALOG_STYLE_LIST,"Jobs","Lawyer\nMechanic\nBus driver\nGarbage man\n Pizza boy\nStreet sweeper\nFarmer\nTrucker\nMail man\nCar jacker (level 7 required)\nCancel","Locate","Cancel"); } } } else if(dialogid == GUIDE_DIALOG+1) { if(response) { switch(listitem) { case 0: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,2045.7875,-1908.0713,13.5469,5.0); } case 1: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1555.1761,-1675.5942,16.1953,5.0); } case 2: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1928.585937,-1776.023193,13.546895,5.0); } case 3: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,2230.3579,-2286.2107,14.3751,5.0); } case 4: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1616.906004, -1662.010375, 13.546875,5.0); } case 5: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1616.906004, -1662.010375, 13.546875,5.0); } } } } else if(dialogid == GUIDE_DIALOG+2) { if(response) { switch(listitem) { case 0://lawyer { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1479.4734,-1771.9307,17.7958,5.0); } case 1://mechanic { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,2077.52,-2013.56,13.54,5.0); } case 2://bus driver { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1154.2208,-1770.8203,16.5992,5.0); } case 3://garbage man { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,2195.8198,-1972.8297,13.5589,5.0); } case 4://pizza { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,2101.7620,-1812.5922,13.5547,5.0); } case 5://street sweeper { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1611.5129,-1893.6997,13.5469,5.0); } case 6://farmer { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,-382.2919,-1426.3506,26.1470,5.0); } case 7://trucker { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,2461.6589,-2116.8489,13.5530,5.0); } case 8://mailman { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,1083.3729,-1226.8977,15.8203,5.0); } case 9://Car Jacker { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SendClientMessage(playerid,COLOR_LIGHTRED,"GPS: locating successful"); SetPlayerCheckpoint(playerid,2380.3479,-2265.0139,13.5469,5.0); } } } } else if(dialogid == BUY_DIALOG) { if(response) { new string[80]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); GiveNameSpace(sendername); if(PlayerInfo[playerid][pMaskUse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", RandMask[playerid]); } if(listitem == 0 && GetPlayerPCash(playerid)>=20) { GivePlayerPCash(playerid, - 20); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a Phonebook, You can now use /number."); PlayerInfo[playerid][pPhoneBook] = 1; format(string, sizeof(string), "* %s purchases a phone book.", sendername); } else if(listitem == 1 && GetPlayerPCash(playerid)>=10) { GivePlayerPCash(playerid, - 10); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought Dice, You can now use /dice."); gDice[playerid] = 1; format(string, sizeof(string), "* %s purchases a dice.", sendername); } else if(listitem == 2 && GetPlayerPCash(playerid)>=50) { if(PlayerInfo[playerid][pLevel] < 5) { SendClientMessage(playerid,COLOR_GREY," You are not level 5 !"); return 1; } GivePlayerPCash(playerid, - 50); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a Mask, You can use /mask."); PlayerInfo[playerid][pMask] = 1; format(string, sizeof(string), "* %s purchases a mask.", sendername); } else if(listitem == 3 && GetPlayerPCash(playerid)>=35) { GivePlayerPCash(playerid, - 35); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a Watch, You can now use /time."); PlayerInfo[playerid][pWatch] = PlayerInfo[playerid][pWatch]+1; format(string, sizeof(string), "* %s purchases a watch.", sendername); } else if(listitem == 4 && GetPlayerPCash(playerid)>=50) { PlayerInfo[playerid][pWalkie] = PlayerInfo[playerid][pWalkie]+1; GivePlayerPCash(playerid, - 50); format(string, sizeof(string), "* %s purchases a walkie talkie.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a Walkie Talkie, Use /setfreq and /wt!"); } else if(listitem == 5 && GetPlayerPCash(playerid)>=90) { GivePlayerPCash(playerid, - 90); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a Spray Can."); GivePlayerWeaponEx(playerid,41,100); format(string, sizeof(string), "* %s purchases a spray can.", sendername); } else if(listitem == 6 && GetPlayerPCash(playerid)>=3) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK); GivePlayerPCash(playerid, - 7); format(string, sizeof(string), "* %s purchases a sprunk can.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a sprunk can."); } else if(listitem == 7 && GetPlayerPCash(playerid)>=100) { GivePlayerPCash(playerid, - 100); Rope[playerid] = 1; format(string, sizeof(string), "* %s purchases a rope.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a Rope, You can use /tie now."); } else if(listitem == 8 && GetPlayerPCash(playerid)>=20) { GivePlayerPCash(playerid, - 20); PlayerInfo[playerid][pCigs] = 10; format(string, sizeof(string), "* %s purchases a Pack of 10 cigarettes.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a 10 Pack of Cigarettes, You can use /smoke."); } else if(listitem == 9 && GetPlayerPCash(playerid)>=5) { GivePlayerPCash(playerid, - 5); PlayerInfo[playerid][pLighter] = 20; format(string, sizeof(string), "* %s purchases a lighter.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a lighter."); } else if(listitem == 10 && GetPlayerPCash(playerid)>=100) { if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid,COLOR_GREY," You are not level 3 !"); return 1; } GivePlayerPCash(playerid, - 100); WEEDS[playerid]++; format(string, sizeof(string), "* %s purchases some seeds.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought seeds, you can type /plant."); } else if(listitem == 11 && GetPlayerPCash(playerid)>=20) { GivePlayerPCash(playerid, - 20); PlayerInfo[playerid][pHiddenNum] = 1; format(string, sizeof(string), "* %s purchases a hidden number.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You number is now off the Phone Book."); } else if(listitem == 12 && GetPlayerPCash(playerid)>=75) { GivePlayerPCash(playerid, - 75); PlayerInfo[playerid][pRadio] = PlayerInfo[playerid][pRadio]+1; format(string, sizeof(string), "* %s purchases an MP3 player.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You can now listen to Radio Stations."); } else if(listitem == 13 && GetPlayerPCash(playerid)>=25) { if(PlayerInfo[playerid][pLevel] < 3) { SendClientMessage(playerid,COLOR_GREY," You are not level 3 !"); return 1; } GivePlayerPCash(playerid, - 25); PlayerInfo[playerid][pSkate] = 1; format(string, sizeof(string), "* %s purchases skates.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You can now use /skate."); } else if(listitem == 14 && GetPlayerPCash(playerid)>=55) { GivePlayerPCash(playerid, - 55); PlayerInfo[playerid][pCellphone] = PlayerInfo[playerid][pCellphone]+1; format(string, sizeof(string), "* %s purchases a cellphone.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a cellphone."); } else if(listitem == 15 && GetPlayerPCash(playerid)>=200) { if(PlayerInfo[playerid][pCellphone] == 0) { SendClientMessage(playerid,COLOR_GREY," You dont have a cellphone !"); return 1; } if(PlayerInfo[playerid][pCellplan] == 1) { GivePlayerPCash(playerid, - 200); PlayerInfo[playerid][pCelltime] += 200; format(string, sizeof(string), "* %s purchases a 200$ phone credit card.", sendername); SendClientMessage(playerid,COLOR_WHITE,"[INFO]: You have bought a 200 dollars phone credit."); } else { SendClientMessage(playerid, COLOR_WHITE, "You have a postpaid mobile phone, you can't use this."); } } else if(listitem == 16 && GetPlayerPCash(playerid)>=50) { GivePlayerWeaponEx(playerid,2,1); GivePlayerPCash(playerid, - 50); format(string, sizeof(string), "* %s purchases a Golfclub.", sendername); } else if(listitem == 17 && GetPlayerPCash(playerid)>=30) { GivePlayerWeaponEx(playerid,5,1); GivePlayerPCash(playerid, - 30); format(string, sizeof(string), "* %s purchases a Baseball Bat.", sendername); } else if(listitem == 18 && GetPlayerPCash(playerid)>=20) { GivePlayerWeaponEx(playerid,6,1); GivePlayerPCash(playerid, - 30); format(string, sizeof(string), "* %s purchases a Shovel.", sendername); } else if(listitem == 19 && GetPlayerPCash(playerid)>=40) { GivePlayerWeaponEx(playerid,7,1); GivePlayerPCash(playerid, - 40); format(string, sizeof(string), "* %s purchases a Poolstick.", sendername); } else if(listitem == 20 && GetPlayerPCash(playerid)>=10) { GivePlayerWeaponEx(playerid,14,1); GivePlayerPCash(playerid, - 10); format(string, sizeof(string), "* %s purchases some Flowers.", sendername); } else if(listitem == 21 && GetPlayerPCash(playerid)>=20) { GivePlayerWeaponEx(playerid,15,1); GivePlayerPCash(playerid, - 20); format(string, sizeof(string), "* %s purchases a Cane.", sendername); } else if(listitem == 22 && GetPlayerPCash(playerid)>=140) { GivePlayerWeaponEx(playerid,1,1); GivePlayerPCash(playerid, - 140); format(string, sizeof(string), "* %s purchases some Brass Knuckles.", sendername); } else if(listitem == 23 && GetPlayerPCash(playerid)>=100) { if(PlayerInfo[playerid][pGasCan]==1) { SendClientMessage(playerid,COLOR_GRAD2,"You already have a can of gas!"); return 1; } GivePlayerPCash(playerid, - 100); format(string, sizeof(string), "* %s purchases a can of gas.", sendername); PlayerInfo[playerid][pGasCan]=1; } else if(listitem == 24 && GetPlayerPCash(playerid)>=200) { if(Sunglasses[playerid]==1) { SendClientMessage(playerid,COLOR_GRAD2,"You already have a pair of sunglasses!"); return 1; } GivePlayerPCash(playerid, - 100); format(string, sizeof(string), "* %s purchases some sunglasses.", sendername); Sunglasses[playerid]=1; } else if(listitem == 25 && GetPlayerPCash(playerid)>=500) { GivePlayerPCash(playerid, - 500); format(string, sizeof(string), "* %s purchases a camera.", sendername); GivePlayerWeaponEx(playerid, 43, 25); } else if(listitem == 26 && GetPlayerPCash(playerid)>=3000) { GivePlayerPCash(playerid, - 3000); format(string, sizeof(string), "* %s purchases a cane.", sendername); GivePlayerWeaponEx(playerid, 15, 1); } else { SendClientMessage(playerid,COLOR_GRAD2,"You don't have enough money."); return 1; } ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new txt[512]; format(txt,sizeof(txt),"Phone Book(20$)\nDice(10$)\nMask(50$)\nWatch(35$)\nWalkieTalkie(50$)\nSpray Can(90$)\nSprunk Can(3$)\nRope(100$)\nCigarettes(20$)\nLighter(5$)\nSeeds(100$)\nHidden Number(20$)\nMP3 Player(75$)\nRoller Skates(25$)\nCellphone(55$)\nPhone credit(200$)\nGolfclub(50$)\nBat(30$)\nShovel(20$)\nPool Stick(40$)\nFlowers(10$)\nCane(20$)\nBrass Knuckles(140$)\nGas Can(100$)\nSun glasses($200)\nCamera ($500)"); ShowPlayerDialog(playerid, BUY_DIALOG, DIALOG_STYLE_LIST,"24/7 Supermarket", txt, "Buy", "Leave"); } } else if(dialogid == NEON_DIALOG) { if(response) { new vehicleid = GetPlayerVehicleID(playerid); if(VehicleNeon1[vehicleid] != 0 && listitem != 6|| VehicleNeon2[vehicleid] != 0 && listitem != 6) { return SendClientMessage(playerid, COLOR_GREY, "You got neons, remove them first."); } if(listitem == 0) {//blue VehicleNeon1[vehicleid] = CreateObject(18648,0,0,0,0,0,0); VehicleNeon2[vehicleid] = CreateObject(18648,0,0,0,0,0,0); SendClientMessage(playerid, COLOR_BLUE, "Blue neon bought"); } if(listitem == 1) {//red VehicleNeon1[vehicleid] = CreateObject(18647,0,0,0,0,0,0); VehicleNeon2[vehicleid] = CreateObject(18647,0,0,0,0,0,0); SendClientMessage(playerid, COLOR_RED, "Red neon bought"); } if(listitem == 2) {//green VehicleNeon1[vehicleid] = CreateObject(18649,0,0,0,0,0,0); VehicleNeon2[vehicleid] = CreateObject(18649,0,0,0,0,0,0); SendClientMessage(playerid, COLOR_GREEN, "Green neon bought"); } if(listitem == 3) {//white VehicleNeon1[vehicleid] = CreateObject(18652,0,0,0,0,0,0); VehicleNeon2[vehicleid] = CreateObject(18652,0,0,0,0,0,0); SendClientMessage(playerid, COLOR_WHITE, "White neon bought"); } if(listitem == 4) {//pink VehicleNeon1[vehicleid] = CreateObject(18651,0,0,0,0,0,0); VehicleNeon2[vehicleid] = CreateObject(18651,0,0,0,0,0,0); SendClientMessage(playerid, COLOR_PURPLE, "Pink neon bought"); } if(listitem == 5) {//yellow VehicleNeon1[vehicleid] = CreateObject(18650,0,0,0,0,0,0); VehicleNeon2[vehicleid] = CreateObject(18650,0,0,0,0,0,0); SendClientMessage(playerid, COLOR_YELLOW, "Yellow neon bought"); } if(listitem == 6) {//remove neon DestroyObject(VehicleNeon1[vehicleid]); DestroyObject(VehicleNeon2[vehicleid]); VehicleNeon1[vehicleid] = 0; VehicleNeon2[vehicleid] = 0; return 1; } AttachObjectToVehicle(VehicleNeon1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(VehicleNeon2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); GivePlayerPCash(playerid, -200); } } else if(dialogid == RADIO_DIALOG) { if(response == 1)//used "change" button { new VehicleID = GetPlayerVehicleID(playerid); VehicleRadio[VehicleID] = listitem; foreach (Player, i) { if(VehicleID == GetPlayerVehicleID(i)) { SendClientMessage(playerid, COLOR_GREEN, "Please wait for the radio to change"); StopAudioStreamForPlayer(playerid); SetTimerEx("StartRadio",500,false,"i",i); } } } } else if(dialogid == MASK_DIALOG) { if(response) { if(listitem == 0)//Hockeymask1 { SetPlayerAttachedObject(playerid, 4, 19036, 2, 0.107, 0.020, 0.0, 90, 90, 0); } if(listitem == 1)//Hockeymask2 { SetPlayerAttachedObject(playerid, 4, 19037, 2, 0.107, 0.020, 0.0, 90, 90, 0); } if(listitem == 2)//Hockeymask3 { SetPlayerAttachedObject(playerid, 4, 19038, 2, 0.107, 0.020, 0.0, 90, 90, 0); } if(listitem == 3)//Zorromask { SetPlayerAttachedObject(playerid, 4, 18974, 2, 0.098, 0.0258, 0.0, 90, 90, 0); } if(listitem == 4)//Boxing { SetPlayerAttachedObject(playerid, 4, 18952, 2, 0.105, 0.01, 0.0, 0, 0, 0); } if(listitem == 5)//bandanna1 { SetPlayerAttachedObject(playerid, 4, 18911, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 6)//bandanna2 { SetPlayerAttachedObject(playerid, 4, 18912, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 7)//bandanna3 { SetPlayerAttachedObject(playerid, 4, 18913, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 8)//bandanna4 { SetPlayerAttachedObject(playerid, 4, 18914, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 9)//bandanna5 { SetPlayerAttachedObject(playerid, 4, 18915, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 10)//bandanna6 { SetPlayerAttachedObject(playerid, 4, 18916, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 11)//bandanna7 { SetPlayerAttachedObject(playerid, 4, 18917, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 12)//bandanna8 { SetPlayerAttachedObject(playerid, 4, 18918, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 13)//bandanna9 { SetPlayerAttachedObject(playerid, 4, 18919, 2, -0.08, 0.03, 0.0, 90, -180, -90); } if(listitem == 14)//bandanna10 { SetPlayerAttachedObject(playerid, 4, 18920, 2, -0.08, 0.03, 0.0, 90, -180, -90); } } } else if(dialogid == NUMBER_DIALOG) { if(response) { if(PlayerInfo[playerid][pDonateRank] != 0) { if(!IsNumeric(inputtext)) { SendClientMessage(playerid, COLOR_WHITE, "Inputed value must be numeric and above 0!"); return 1; } new number = strval(inputtext); if(number < 1) { SendClientMessage(playerid, COLOR_WHITE, "Inputed value must be numeric and above 0!"); return 1; } if(number > 9999999) { SendClientMessage(playerid, COLOR_WHITE, "Inputed value must not be longer than 7 characters!"); return 1; } new string[1024]; format(string, sizeof(string), "SELECT `Name` FROM `players` WHERE `PhoneNr`=%d",number); mysql_query_ex(string); mysql_store_result(); if(mysql_num_rows() == 0) { PlayerInfo[playerid][pPnumber] = number; SendClientMessage(playerid, COLOR_WHITE, "Number changed!"); } else { SendClientMessage(playerid, COLOR_WHITE, "That number is already taken!"); } mysql_free_result(); } } } else if(dialogid == AGE_DIALOG) { if(response) { if(!IsNumeric(inputtext)) { ShowPlayerDialog(playerid, AGE_DIALOG, 1, "{3399CC}Set your age{FFFFFF}", "Please enter how old do you want your character to be (14-80).", "Set", "Exit"); return 1; } new age = strval(inputtext); if(age < 14 || age > 80) { ShowPlayerDialog(playerid, AGE_DIALOG, 1, "{3399CC}Set your age{FFFFFF}", "Please enter how old do you want your character to be (14-80).", "Set", "Exit"); return 1; } PlayerInfo[playerid][pAge] = age; } } else if(dialogid == ROB_DIALOG) { if(listitem == 0)//San Fierro { gPlayerCheckpointStatus[playerid] = CHECKPOINT_ROB; SetPlayerCheckpoint(playerid, -2159.1843,-264.1525,36.5156,7.0); } else if(listitem == 1)//Las Venturas { gPlayerCheckpointStatus[playerid] = CHECKPOINT_ROB; SetPlayerCheckpoint(playerid, 1641.8733,2354.6479,10.8130,7.0); } } else if(dialogid == TEST_DIALOG) { if(!response) { Kick(playerid); } if(!IsNumeric(inputtext)) { ShowPlayerDialog(playerid, TEST_DIALOG, 1, "Birthdate", "Inputed value must be numeric, above 14 and bellow 80!\nType in how old do you want your character to be:", "Ok", "Quit"); return 1; } new age = strval(inputtext); if(age < 14 || age > 80) { ShowPlayerDialog(playerid, TEST_DIALOG, 1, "Birthdate", "Inputed value must be numeric, above 14 and bellow 80!\nType in how old do you want your character to be:", "Ok", "Quit"); return 1; } PlayerInfo[playerid][pAge] = age; ShowPlayerDialog(playerid, TEST_DIALOG+1, DIALOG_STYLE_LIST, "Please select your sex:", "Male\nFemale", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+1) { if(!response) { Kick(playerid); } PlayerInfo[playerid][pSex] = listitem+1; SetPlayerSkinEx(playerid, 21); PlayerInfo[playerid][pModel] = 21; ShowPlayerDialog(playerid, TEST_DIALOG+2, DIALOG_STYLE_LIST, "Please select where are you from:", "USA\nEurope\nAfrica\nAsia", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+2) { if(!response) { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+3, DIALOG_STYLE_LIST, "What is RP?", "1.Using OOC info IC.\n2.Killing people without a good reason.\n3.Stimulating the real life\n4.Jumping to get somewhere faster.", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+3) { if(!response) { Kick(playerid); } if(listitem != 2)//rigt one -1 { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+4, DIALOG_STYLE_LIST, "What is DM?", "1.Car Surfing.\n2.Killing people without a good reason.\n3.Using IC info OOC\n4.Using keybinds.", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+4) { if(!response) { Kick(playerid); } if(listitem != 1)//rigt one -1 { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+5, DIALOG_STYLE_LIST, "What is IC?", "1.Chat between players.\n2.Chat between player-controlled characters.\n3.Incorrect usage of chat.\n4.Using shortcuts in chat.", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+5) { if(!response) { Kick(playerid); } if(listitem != 1)//rigt one -1 { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+6, DIALOG_STYLE_LIST, "What is OOC?", "1.Chat between player-controlled characters.\n2.Chat between players\n3.One of city centers.\n4.Using shortcuts in chat.", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+6) { if(!response) { Kick(playerid); } if(listitem != 1)//rigt one -1 { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+7, DIALOG_STYLE_LIST, "What is a good example of /me?", "1./me shoots David and takes his money.\n2./me kills John.\n3./me and /you.\n4./me extends his right arm, attemping to give Ivan a gun./do s/f.", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+7) { if(!response) { Kick(playerid); } if(listitem != 3)//rigt one -1 { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+8, DIALOG_STYLE_LIST, "What is the correct usage of /b (local ooc chat)?", "1./b Help! He will kidnap me.\n2./b Wanna buy some drugs?.\n3./b Where are you from IRL?\n4./b What's your phone number IC?", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+8) { if(!response) { Kick(playerid); } if(listitem != 2)//rigt one -1 { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+9, DIALOG_STYLE_LIST, "If you want to become a helper, what will you do?", "1.Contact server owner\n2.Ask any lead admin to add me as a helper.\n3.Apply on the forums if applications are open, if not ill wait.", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+9) { if(!response) { Kick(playerid); } if(listitem != 2)//rigt one -1 { Kick(playerid); } ShowPlayerDialog(playerid, TEST_DIALOG+10, DIALOG_STYLE_LIST, "What will you do if someone attacked you from behind with a gun?", "1.Run\n2.Insult him in OOC chat if i didn't do anything to him.\n3.Ask for help using /helpme.\n4.Use /me and /do commands to describe that i'm scared and do /handsup.", "Ok", "Quit"); } else if(dialogid == TEST_DIALOG+10) { if(!response) { Kick(playerid); } if(listitem != 3)//rigt one -1 { Kick(playerid); } ClearChatbox(playerid, 5); RegistrationStep[playerid] = 0; PlayerInfo[playerid][pTut] = 1; SetTimerEx("Tutorial", 3000, false, "i", playerid); ShowPlayerDialog(playerid, MSG_DIALOG, 0, "Congratulations", "Congratulations, you have passed the test.\nIf you need any help, use /helpme (ooc)\nIf you see a hacker, report him using /report\nWelcome to Los Santos Life RolePlay server\nPlease register on our forums :)", "Ok", "Quit"); } return 0; }