06.03.2019, 14:14
I made few global textdraws and a few player textdraws, they are used for command /inv (inventory) there you can add things to inventory or take them out, so basically when I use command /adminvehicle, and then select vehicle from Model List, when vehicle spawns suddenly dialog for Putting thing in inventory is Showing for me hundereds of times like I can not do anything but close the game, it is just spamming ShowPlayerDialog for me, Iam asking myself how is those textdraws and dialogs from inventory connected with model selection menu for admin cars. Here is my command /admincar (SCM is for SendClientMessage, these "BELA" and "CRVENA" are defined colors)
And here is that inventory textdraws (just place where you server responds to selecting them)
There was something I missed it is DestroyTextdraw of Gm exit, if fixed it but this this is still not working (there are some thing in code in other language don`t mind them, I translated most things)
If you can help me fast and i`ll give you rep
Код:
YCMD:adminvehicle(playerid, params[],help) { #pragma unused help if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,""CRVENA"!i!i Error i!i! "BELA"You are not logged in!"); if(PlayerInfo[playerid][pUEventu] > -1) return SCM(playerid,-1,""CRVENA".::Error::. "BELA"You are in event."); if(PlayerInfo[playerid][pGM] >= 1 || PlayerInfo[playerid][pAdmin] >= 1) { if(AdminDuty[playerid] == 0 && GMDuty[playerid] == 0) return SCM(playerid,-1,""PLAVA".:: "BELA"LK "PLAVA"::. You must be on duty!"); if(stvorioavozilo[playerid] == 0) { ShowModelSelectionMenu(playerid, vozilolist, "Admin Vehicles"); } else if(stvorioavozilo[playerid] == 1) { DestroyVehicle(adminvozilo[playerid]); Delete3DTextLabel(avehl[playerid]); adminvozilo[playerid] = -1; stvorioavozilo[playerid] = 0; SCM(playerid,-1,""PLAVA".:: "BELA"LK "PLAVA"::. You destroyed vehicle."); } } else return SCM(playerid,-1,""PLAVA".:: "BELA"LK "PLAVA"::. "SIVA"Just Admins."); return 1; }
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid) { if(clickedid == inv[19]) //put { SPD(playerid, 1432, DIALOG_STYLE_LIST, ""ZELENA"Put things in Inventory", ""CRVENA"- "serverboja"Oruzije 1\n"CRVENA"- "serverboja"Oruzije 2\n"CRVENA"- "serverboja"Oruzije 3\n"CRVENA"- "serverboja"Droga\n"CRVENA"- "serverboja"Mats\n", "Odaberi", "X"); CancelSelectTextDraw(playerid); } else if(clickedid == inv[20]) //take { SPD(playerid, 1431, DIALOG_STYLE_LIST, ""ZELENA"Take things out from the Inventory", ""CRVENA"- "serverboja"Oruzije 1\n"CRVENA"- "serverboja"Oruzije 2\n"CRVENA"- "serverboja"Oruzije 3\n"CRVENA"- "serverboja"Droga\n"CRVENA"- "serverboja"Mats\n", "Odaberi", "X"); CancelSelectTextDraw(playerid); } else if(clickedid == inv[21]) //exit { TextDrawHideForPlayer(playerid, inv[0]); TextDrawHideForPlayer(playerid, inv[1]); TextDrawHideForPlayer(playerid, inv[2]); TextDrawHideForPlayer(playerid, inv[3]); TextDrawHideForPlayer(playerid, inv[4]); TextDrawHideForPlayer(playerid, inv[5]); TextDrawHideForPlayer(playerid, inv[6]); TextDrawHideForPlayer(playerid, inv[7]); TextDrawHideForPlayer(playerid, inv[8]); TextDrawHideForPlayer(playerid, inv[9]); TextDrawHideForPlayer(playerid, inv[10]); TextDrawHideForPlayer(playerid, inv[11]); TextDrawHideForPlayer(playerid, inv[12]); TextDrawHideForPlayer(playerid, inv[13]); TextDrawHideForPlayer(playerid, inv[14]); TextDrawHideForPlayer(playerid, inv[15]); TextDrawHideForPlayer(playerid, inv[16]); TextDrawHideForPlayer(playerid, inv[17]); TextDrawHideForPlayer(playerid, inv[18]); TextDrawHideForPlayer(playerid, inv[19]); TextDrawHideForPlayer(playerid, inv[20]); TextDrawHideForPlayer(playerid, inv[21]); TextDrawHideForPlayer(playerid, inv[22]); TextDrawHideForPlayer(playerid, inv[23]); PlayerTextDrawHide(playerid, invp[playerid][0]); PlayerTextDrawHide(playerid, invp[playerid][1]); PlayerTextDrawHide(playerid, invp[playerid][2]); PlayerTextDrawHide(playerid, invp[playerid][3]); PlayerTextDrawHide(playerid, invp[playerid][4]); CancelSelectTextDraw(playerid); invotvorio[playerid] = 0; } return 0; }
If you can help me fast and i`ll give you rep