Renaz Posted April 4, 2020 Share Posted April 4, 2020 (edited) estou á muito tempo aqui tentando resolver esse erro, já tentei de 2 formas diferentes nesse aqui ele dá bad argument @ bindKey function AbrirPainel () if painel == false then addEventHandler ( "onClientRender", root, PainelPrincipal ) painel = true else removeEventHandler ( "onClientRender", root, PainelPrincipal ) painel = false end end bindKey("F2" , "down" , AbrirPainel) nesse aqui não dá erro nenhum mas o painel não abre. function AbrirPainel () if painel == false then addEventHandler ( "onClientRender", root, PainelPrincipal ) painel = true else removeEventHandler ( "onClientRender", root, PainelPrincipal ) painel = false end end function bindpainel (commandName) bindKey("F2" , "down" , AbrirPainel) end addCommandHandler("painelp" , bindpainel) Edited April 4, 2020 by Renaz Link to comment
Other Languages Moderators Lord Henry Posted April 4, 2020 Other Languages Moderators Share Posted April 4, 2020 Falta uma parte do erro. Diga a mensagem inteira do erro. 1 Link to comment
Renaz Posted April 4, 2020 Author Share Posted April 4, 2020 Não está dando esse erro mais , agora é "attempt to call global 'keyBind' (a nill value) function AbrirPainel() if painel == false then addEventHandler ("onClientRender", root, PainelPrincipal) painel = true else removeEventHandler ("onClientRender", root, PainelPrincipal) painel = false end end keyBind("F2" , "down" , AbrirPainel) Link to comment
MRXBBC Posted April 4, 2020 Share Posted April 4, 2020 2 minutes ago, Renaz said: Não está dando esse erro mais , agora é "attempt to call global 'keyBind' (a nill value) function AbrirPainel() if painel == false then addEventHandler ("onClientRender", root, PainelPrincipal) painel = true else removeEventHandler ("onClientRender", root, PainelPrincipal) painel = false end end keyBind("F2" , "down" , AbrirPainel) n existe esse keybind que vc colocou 1 Link to comment
Renaz Posted April 4, 2020 Author Share Posted April 4, 2020 1 minute ago, MRXBBC said: end keyBind("F2" , "down" , AbrirPainel) existe sim. Link to comment
MRXBBC Posted April 4, 2020 Share Posted April 4, 2020 Just now, Renaz said: existe sim. n tinha visto é alguma expressão de codigo externo, o seu console também n ta achando 1 Link to comment
Renaz Posted April 4, 2020 Author Share Posted April 4, 2020 3 minutes ago, MRXBBC said: n tinha visto é alguma expressão de codigo externo, o seu console também n ta achando tem como eu resolver de alguma forma? Link to comment
MRXBBC Posted April 4, 2020 Share Posted April 4, 2020 Just now, Renaz said: tem como eu resolver de alguma forma? coloca bindkey mano kkkkk, vai funcionar 1 Link to comment
Renaz Posted April 4, 2020 Author Share Posted April 4, 2020 (edited) Não agora voltou para o erro antigo Bad argument @ 'bindKey' [Expected player at argument 1 , got string 'B' ] Edited April 4, 2020 by Renaz Link to comment
Other Languages Moderators Lord Henry Posted April 4, 2020 Other Languages Moderators Share Posted April 4, 2020 O script está em server-side, mude pra client-side. 2 Link to comment
Renaz Posted April 4, 2020 Author Share Posted April 4, 2020 (edited) o script está em client-side Edited April 4, 2020 by Renaz Link to comment
Other Languages Moderators Lord Henry Posted April 4, 2020 Other Languages Moderators Share Posted April 4, 2020 Mande o meta.xml então. Mande também o script inteiro que está dando erro. Pois o erro que vc apontou não está nessa parte do código. 1 Link to comment
Renaz Posted April 4, 2020 Author Share Posted April 4, 2020 painel = false function AbrirPainel() if painel == false then addEventHandler ("onClientRender", root, PainelPrincipal) painel = true else removeEventHandler ("onClientRender", root, PainelPrincipal) painel = false end end bindKey("B" , "down" , AbrirPainel) function PainelPrincipal() dxDrawLine(23 - 1, 174 - 1, 23 - 1, 513, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 174 - 1, 23 - 1, 174 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 513, 218, 513, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 513, 218, 174 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 174, 195, 339, tocolor(0, 0, 0, 144), false) dxDrawRectangle(23, 174, 195, 44, tocolor(255, 63, 63, 182), false) dxDrawText("Painel Pessoal", 25 - 1, 177 - 1, 213 - 1, 214 - 1, tocolor(0, 0, 0, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Painel Pessoal", 25 + 1, 177 - 1, 213 + 1, 214 - 1, tocolor(0, 0, 0, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Painel Pessoal", 25 - 1, 177 + 1, 213 - 1, 214 + 1, tocolor(0, 0, 0, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Painel Pessoal", 25 + 1, 177 + 1, 213 + 1, 214 + 1, tocolor(0, 0, 0, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Painel Pessoal", 25, 177, 213, 214, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawLine(23 - 1, 219 - 1, 23 - 1, 255, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 219 - 1, 23 - 1, 219 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 255, 218, 255, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 255, 218, 219 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 219, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawText("Admin", 24, 218, 218, 254, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawLine(23 - 1, 255 - 1, 23 - 1, 291, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 255 - 1, 23 - 1, 255 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 291, 218, 291, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 291, 218, 255 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 255, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawLine(23 - 1, 291 - 1, 23 - 1, 327, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 291 - 1, 23 - 1, 291 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 327, 218, 327, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 327, 218, 291 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 291, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawLine(23 - 1, 327 - 1, 23 - 1, 363, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 327 - 1, 23 - 1, 327 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 363, 218, 363, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 363, 218, 327 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 327, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawLine(23 - 1, 363 - 1, 23 - 1, 399, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 363 - 1, 23 - 1, 363 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 399, 218, 399, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 399, 218, 363 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 363, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawLine(23 - 1, 399 - 1, 23 - 1, 435, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 399 - 1, 23 - 1, 399 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 435, 218, 435, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 435, 218, 399 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 399, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawLine(23 - 1, 435 - 1, 23 - 1, 471, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 435 - 1, 23 - 1, 435 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 471, 218, 471, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 471, 218, 435 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 435, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawLine(23 - 1, 471 - 1, 23 - 1, 507, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 471 - 1, 23 - 1, 471 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(23 - 1, 507, 218, 507, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(218, 507, 218, 471 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(23, 471, 195, 36, tocolor(255, 255, 255, 0), false) dxDrawText("Policia", 23, 254, 217, 290, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Mecânico", 23, 291, 217, 327, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Inem", 24, 327, 218, 363, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Inventário", 24, 363, 218, 399, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Animações", 24, 399, 218, 435, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Veiculo", 23, 435, 217, 471, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Informações", 24, 471, 218, 507, tocolor(255, 255, 255, 255), 0.90, "pricedown", "center", "center", false, false, false, false, false) dxDrawRectangle(23, 507, 195, 6, tocolor(255, 63, 63, 182), false) end <meta> <script src="server.Lua" /> <script src="client.Lua" /> </meta> Link to comment
MRXBBC Posted April 4, 2020 Share Posted April 4, 2020 (edited) <meta> <script src="client.Lua" type="client" /> <script src="sever.Lua" type="server" /> </meta> irmão tenta por assim Edited April 4, 2020 by Lord Henry Removido citação desnecessária e código formatado de texto para XML 1 Link to comment
Other Languages Moderators Lord Henry Posted April 4, 2020 Other Languages Moderators Share Posted April 4, 2020 (edited) @Renaz Você não declarou o lado do script no meta.xml Edited April 4, 2020 by Lord Henry 1 Link to comment
Renaz Posted April 4, 2020 Author Share Posted April 4, 2020 muito obrigado , esqueci de colocar :V Link to comment
MRXBBC Posted April 4, 2020 Share Posted April 4, 2020 2 minutes ago, Lord Henry said: @Renaz Você não declarou o lado do script no meta.xml Lord tem como dá uma olhada no meu tópico? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now