scienziato-pazzo

Members
  • Content Count

    108
  • Joined

  • Last visited

Community Reputation

0 Neutral

About scienziato-pazzo

  • Rank
    Punk-@ss B*tch
  • Birthday 03/12/1998

Details

  • Gang
    Grove
  • Location
    Bari, Italy

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ok, now this is the full script. Client: Expired Server: Expired
  2. I posted the full code. None can help me?
  3. Client-side: function attivaSceltaPersonaggi() local screenWidth, screenHeight = guiGetScreenSize() local sx, sy = screenWidth/1440, screenHeight/900 listapersonaggi = guiCreateGridList(360*sx, 185*sy, 320*sx, 168*sy, false) guiGridListSetSelectionMode(listapersonaggi, 2) guiSetVisible(listapersonaggi, false) creapgbutt = guiCreateButton(360*sx, 366*sy, 120*sx, 80*sy, "Crea Personaggio", false) eliminapgbutt = guiCreateButton(560*sx, 368*sy, 120*sx, 80*sy, "Elimina Personaggio", false) selezionapgbutt = guiCreateButton(460*sx, 500*sy, 150*sx, 50*sy, "SELEZIONA", false) guiSetVisible(creapgbutt, false) guiSetVisible(eliminapgbutt, false) guiSetVisible(selezionapgbutt, false) addEventHandler("onClientGUIClick", selezionapgbutt, spawnaPg, false) addEventHandler("onClientGUIClick", creapgbutt, creaPg, false) end addEvent("onSceltaPersonaggioAttiva", true) addEventHandler("onSceltaPersonaggioAttiva", getRootElement(), attivaSceltaPersonaggi) function spawnaPg(button, state, absoluteX, absoluteY) -- Funzione invio spawn Personaggio SERVER --outputChatBox(itemselezionato) local riga, colonna = guiGridListGetSelectedItem ( listapersonaggi ) local itemselezionato = guiGridListGetItemText ( listapersonaggi, riga, colonna ) if button == "left" then if state == "up" then outputChatBox("Riga: " .. riga .. " Colonna: " .. colonna) if riga ~= -1 and colonna ~= -1 then outputChatBox(itemselezionato) disattivaSelezionePersonaggio() showCursor(false) stopSound(logintheme) triggerServerEvent("spawnaPersonaggio", localPlayer, itemselezionato) else outputChatBox("ERROR: Niente selezionato.") end end end end Server-side: function spawnaPersonaggioF(itemselezionato) --print(itemselezionato) --outputChatBox(itemselezionato) --if client then --if source == sourceRoot then print("test") setPlayerName(client, itemselezionato) spawnPlayer(client, 0.0, 0.0, 4.0) fadeCamera(client, true) setCameraTarget(client) --end --end end addEvent("spawnaPersonaggio", true) addEventHandler("spawnaPersonaggio", root, spawnaPersonaggioF)
  4. function spawnaPersonaggioF(itemselezionato) --print(itemselezionato) --outputChatBox(itemselezionato) --if client then --if source == sourceRoot then print("lezzetti") setPlayerName(client, itemselezionato) spawnPlayer(client, 0.0, 0.0, 4.0) fadeCamera(client, true) setCameraTarget(client) --end --end end addEvent("spawnaPersonaggio", true) addEventHandler("spawnaPersonaggio", root, spawnaPersonaggioF)
  5. This is a part of the code, but these functions work, while this part of the code is bugged (it works, but if two players click on the selezionapgbutt button at the same time, the row value is -1).
  6. function attivaSceltaPersonaggi() local screenWidth, screenHeight = guiGetScreenSize() local sx, sy = screenWidth/1440, screenHeight/900 listapersonaggi = guiCreateGridList(360*sx, 185*sy, 320*sx, 168*sy, false) guiGridListSetSelectionMode(listapersonaggi, 2) guiSetVisible(listapersonaggi, false) creapgbutt = guiCreateButton(360*sx, 366*sy, 120*sx, 80*sy, "Crea Personaggio", false) eliminapgbutt = guiCreateButton(560*sx, 368*sy, 120*sx, 80*sy, "Elimina Personaggio", false) selezionapgbutt = guiCreateButton(460*sx, 500*sy, 150*sx, 50*sy, "SELEZIONA", false) guiSetVisible(creapgbutt, false) guiSetVisible(eliminapgbutt, false) guiSetVisible(selezionapgbutt, false) addEventHandler("onClientGUIClick", selezionapgbutt, spawnaPg, false) addEventHandler("onClientGUIClick", creapgbutt, creaPg, false) end addEvent("onSceltaPersonaggioAttiva", true) addEventHandler("onSceltaPersonaggioAttiva", getRootElement(), attivaSceltaPersonaggi) function spawnaPg(button, state, absoluteX, absoluteY) -- Funzione invio spawn Personaggio SERVER --outputChatBox(itemselezionato) local riga, colonna = guiGridListGetSelectedItem ( listapersonaggi ) local itemselezionato = guiGridListGetItemText ( listapersonaggi, riga, colonna ) if button == "left" then if state == "up" then outputChatBox(riga .. colonna) if riga ~= -1 and colonna ~= -1 then outputChatBox(itemselezionato) disattivaSelezionePersonaggio() showCursor(false) stopSound(logintheme) triggerServerEvent("spawnaPersonaggio", localPlayer, itemselezionato) else outputChatBox("ERROR: Niente selezionato.") end end end end
  7. I reported the issue here: http://bugs.mtasa.com/view.php?id=7995, but I wanna know if for one of you it works without problems.
  8. Yes, but I use dxCreateFont to set the font-size, because if I set it in the dxDrawText function, the font is different.
  9. Hi, I used dxCreateFont to use my custom font on the script. But how can I set the font-size depending on the screen resolution?
  10. Why this function doesn't work? showPlayerHudComponent("clock", false) function updateHud() --outputChatBox("function test") -- It works local screenWidth, screenHeight = guiGetScreenSize() local sx, sy = screenWidth/1400, screenHeight/900 local realtime = getRealTime() local hour = realtime.hour local minute = realtime.minute local timestring = string.format("%i:%i", hour, minute) dxDrawText(timestring, 1229*sx, 56*sy, 140*sx, 148*sy, 0xFFFFFF, 140*sx, 148*sy) end function timeHudF() --outputChatBox("culo") -- It works addEventHandler("onClientRender", getRootElement(), updateHud) end addEvent("timeHud", true) addEventHandler("timeHud", getRootElement(), timeHudF) The function timeHud is called from the server, and all works, but if I add the last 3 parameters to dxDrawText, it doesn't work. I wanna set the font bigger than how is presented by default.
  11. Now all works. I don't know why, but it's a miracle.
  12. I already posted it up. function hudChanger() triggerClientEvent("timeHud", getRootElement()) end addEventHandler("onPlayerSpawn", getRootElement(), hudChanger)