pqp mano, se tentasse identa o cуdigo vocк encontraria o erro.
Vк se funciona.
PHP код:
switch(dialogid)
{
case SPRAYTAG_DIALOG_RETURN: SprayTag_Dialog(playerid, TYPE_LIST_MENU);
case SPRAYTAG_MENU:
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
SprayTag_Dialog(playerid, TYPE_LIST_TAGS_CREATE);
}
case 1: SprayTag_Dialog(playerid, TYPE_LIST_TAGS);
case 2: SprayTag_Dialog(playerid, TYPE_LIST_TAGS_DELETE);
case 3: SprayTag_Dialog(playerid, TYPE_LIST_TAGS_FIND);
}
}
case SPRAYTAG_EDIT_MAIN:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_MENU);
if(SprayTags[playerid][listitem][_spPosX] == 0.0)
return ShowPlayerDialog(playerid, SPRAYTAG_DIALOG_RETURN, DIALOG_STYLE_MSGBOX, "{F7EC6F}Pixe - {BD0000}Erro", "Ops! Nгo ha nada naquele slot.", "Back", "");
spraytag_slot[playerid] = listitem;
spraytag_bold[playerid] = SprayTags[playerid][listitem][_spBold];
spraytag_color[playerid] = SprayTags[playerid][listitem][_spFontColor];
format(spraytag_text[playerid], 50, SprayTags[playerid][listitem][_spText]);
format(spraytag_font[playerid], 50, SprayTags[playerid][listitem][_spFont]);
spraytag_size[playerid] = SprayTags[playerid][listitem][_spFontSize];
SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
}
case SPRAYTAG_DELETE:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_MENU);
if(SprayTags[playerid][listitem][_spPosX] == 0.0)
return ShowPlayerDialog(playerid, SPRAYTAG_DIALOG_RETURN, DIALOG_STYLE_MSGBOX, "{F7EC6F}Pixe - {BD0000} Erro!!", "Ops! Nгo hб nada naquele slot.", "Back", "");
new
szMessage[60];
Tags_Clear(playerid, listitem);
format(szMessage, sizeof szMessage, "[Pixe] A Pixe #%i foi deletada com sucesso.", listitem);
SendClientMessage(playerid, -1, szMessage);
SprayTag_Dialog(playerid, TYPE_LIST_MENU);
}
case SPRAYTAG_FIND:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_MENU);
if(SprayTags[playerid][listitem][_spPosX] == 0.0)
return ShowPlayerDialog(playerid, SPRAYTAG_DIALOG_RETURN, DIALOG_STYLE_MSGBOX, "{F7EC6F}Pixe - {BD0000} Ops!!", "Ops! There's nothing in that slot.", "Back", "");
new
szMessage[60];
spraytag_find[playerid] = SetPlayerCheckpoint(playerid, SprayTags[playerid][listitem][_spPosX], SprayTags[playerid][listitem][_spPosY], SprayTags[playerid][listitem][_spPosZ], 3.0);
format(szMessage, sizeof szMessage, "[Pixe] Um checkpoint foi marcado na sua spraytag #%i.", listitem);
SendClientMessage(playerid, -1, szMessage);
}
case SPRAYTAG_CREATE:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_MENU);
if(SprayTags[playerid][listitem][_spPosX] == 0.0)
{
spraytag_slot[playerid] = listitem;
format(spraytag_text[playerid], 50, "Exemplo");
format(spraytag_font[playerid], 50, "Arial");
spraytag_color[playerid] = -1;
spraytag_size[playerid] = 24;
spraytag_bold[playerid] = 0;
SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
}
else ShowPlayerDialog(playerid, SPRAYTAG_DIALOG_RETURN, DIALOG_STYLE_MSGBOX, "{F7EC6F}Pixe - {BD0000} Ops!!", "Ops! Este slot jб estб sendo usado.", "Back", "");
}
case SPRAYTAG_EDIT_LIST:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_TAGS);
new
iIndex = spraytag_slot[playerid]
;
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, SPRAYTAG_EDIT_TEXT, DIALOG_STYLE_INPUT, "{F7EC6F}Pixe - {469BF0}Textos", "Digite o texto que vocк gostaria de aparecer no Pixe", "Feito", "Voltar");
case 1: ShowPlayerDialog(playerid, SPRAYTAG_EDIT_FONT, DIALOG_STYLE_LIST, "{F7EC6F}Pixe - {469BF0}Fontes", "Arial\nCourier\nImpact\nPricedown\nDaredevil\nBom bing\naaaiight! fat\nFrom Street Art\nGhang\nGraffogie\nGraphers Blog\nNosegrind Demo", "Feito", "Voltar");
case 2: ShowPlayerDialog(playerid, SPRAYTAG_EDIT_SIZE, DIALOG_STYLE_INPUT, "{F7EC6F}Pixe - {469BF0}Tamanho", "Digite o tamanho que deseja que apareзa no Pixe", "Feito", "Voltar");
case 3: ShowPlayerDialog(playerid, SPRAYTAG_EDIT_COLOR, DIALOG_STYLE_LIST, "{F7EC6F}Pixe - {469BF0}Cor", "{FF0000}Vermelho\n{04B404}Verde\n{00B5CD}Azul Claro\n{FFFF00}Amarelo\n{0000FF}Azul\n{848484}Cinz a\n{FF00FF}Rosa\n{FFFFFF}Branco", "Feito", "Voltar");
case 4:
{
switch(spraytag_bold[playerid])
{
case 0: spraytag_bold[playerid] = 1;
case 1: spraytag_bold[playerid] = 0;
}
}
SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
case 5:
{
EditDynamicObject(playerid, SprayTags[playerid][iIndex][_spObject]);
SetPVarInt(playerid, "SPRAYTAG_EDIT", 2);
}
}
}
case SPRAYTAG_EDIT_TEXT:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
format(spraytag_text[playerid], 32, inputtext);
SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
}
case SPRAYTAG_EDIT_FONT:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
format(spraytag_font[playerid], 32, inputtext);
SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
}
case SPRAYTAG_EDIT_SIZE:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
spraytag_size[playerid] = strval(inputtext);
SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
}
case SPRAYTAG_EDIT_COLOR:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
new iColor;
switch(listitem)
{
case 0: iColor = HexToInt("0xFFFF0000");
case 1: iColor = HexToInt("0xFF04B404");
case 2: iColor = HexToInt("0xFF00B5CD");
case 3: iColor = HexToInt("0xFFFFFF00");
case 4: iColor = HexToInt("0xFF0000FF");
case 5: iColor = HexToInt("0xFF848484");
case 6: iColor = HexToInt("0xFFFF00FF");
case 7: iColor = HexToInt("0xFFFFFFFF");
}
spraytag_color[playerid] = iColor;
SprayTag_Dialog(playerid, TYPE_LIST_EDIT);
}
case SPRAYTAG_CREATE_MAIN:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_TAGS_CREATE);
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, SPRAYTAG_CREATE_TEXT, DIALOG_STYLE_INPUT, "{F7EC6F}Pixe - {469BF0}Texto", "Digite o texto que vocк gostaria de aparecer no Pixe", "Feito", "Voltar");
case 1: ShowPlayerDialog(playerid, SPRAYTAG_CREATE_FONT, DIALOG_STYLE_LIST, "{F7EC6F}Pixe - {469BF0}Fonte", "Arial\nCourier\nImpact\nPricedown\nDaredevil\nBom bing\naaaiight! fat\nFrom Street Art\nGhang\nGraffogie\nGraphers Blog\nNosegrind Demo", "Feito", "Voltar");
case 2: ShowPlayerDialog(playerid, SPRAYTAG_CREATE_SIZE, DIALOG_STYLE_INPUT, "{F7EC6F}Pixe - {469BF0}Tamanho", "Aperte enter para selecionar o tamanho do pixe", "Feito", "Voltar");
case 3: ShowPlayerDialog(playerid, SPRAYTAG_CREATE_COLOR, DIALOG_STYLE_LIST, "{F7EC6F}Pixe - {469BF0}Cor", "{FF0000}Vermelho\n{04B404}Verde\n{00B5CD}Azul Claro\n{FFFF00}Amarelo\n{0000FF}Azul\n{848484}Cinz a\n{FF00FF}Rosa\n{FFFFFF}Branco", "Feito", "Voltar");
case 4:
{
switch(spraytag_bold[playerid])
{
case 0: spraytag_bold[playerid] = 1;
case 1: spraytag_bold[playerid] = 0;
}
SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
}
case 5:
{
new
Float:Position[3],
szText[50],
szFont[50]
;
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
format(szText, 50, spraytag_text[playerid]);
format(szFont, 50, spraytag_font[playerid]);
spraytag_object[playerid] = CreateDynamicObject(SPRAY_TAG_OBJECT, Position[0]-1.0, Position[1], Position[2], 0.0, 0.0, 0.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, SPRAY_TAG_OBJECT_DISTANCE);
SetDynamicObjectMaterialText(spraytag_object[playerid], 0, szText, OBJECT_MATERIAL_SIZE_512x512, szFont, spraytag_size[playerid], spraytag_bold[playerid], spraytag_color[playerid], 0, 1);
EditDynamicObject(playerid, spraytag_object[playerid]);
SetPVarInt(playerid, "SPRAYTAG_EDIT", 1);
}
}
}
case SPRAYTAG_CREATE_TEXT:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
format(spraytag_text[playerid], 50, inputtext);
SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
}
case SPRAYTAG_CREATE_FONT:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
format(spraytag_font[playerid], 50, inputtext);
SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
}
case SPRAYTAG_CREATE_SIZE:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
spraytag_size[playerid] = strval(inputtext);
SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
}
case SPRAYTAG_CREATE_COLOR:
{
if(!response) return SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
new iColor;
switch(listitem)
{
case 0: iColor = HexToInt("0xFFFF0000");
case 1: iColor = HexToInt("0xFF04B404");
case 2: iColor = HexToInt("0xFF00B5CD");
case 3: iColor = HexToInt("0xFFFFFF00");
case 4: iColor = HexToInt("0xFF0000FF");
case 5: iColor = HexToInt("0xFF848484");
case 6: iColor = HexToInt("0xFFFF00FF");
case 7: iColor = HexToInt("0xFFFFFFFF");
}
spraytag_color[playerid] = iColor;
SprayTag_Dialog(playerid, TYPE_LIST_CREATE);
}
return 1;
}