-
Posts
382 -
Joined
-
Last visited
Everything posted by yMassai
-
Receio que eu não me contentaria com um mero moderador.
-
Eu acabo de perceber que tem muitas crianças aqui que fazem uma tempestade em um copo de água, lua scripting ou apenas "Lua" uma linguagem de programação não mudará por aderir algo no final, é até mais instrutivo a alguém que n sabe nada, desculpe mas n quero parecer chato ou algo assim, DrakeN não estamos aqui para testar a paciência dos outros e sim ajudar, você não deve sair escrevendo oque vem a cabeça, você poderia ter postado eu acho que assim é melhor. Espero que não ocorra muitos conflitos aqui por besteiras.
-
addEvent("CriminososJob",true) function CriminososJob() triggerClientEvent(source,"CriminososJob",root,TheX,TheY) setPlayerTeam(source,getTeamFromName("Criminosos")) id = getElementModel () if ( id == 124 ) then end end addEventHandler("CriminososJob",root,haveMonkeyJob) I wanted to get a team and a skin. Bad argument @ 'getElementModel'
-
Eu gostaria de saber porque que um individuo veio postar algo sobre um servidor inglês aqui. Esta pagina de tópicos foi criada para os jogadores Portuguêses interagirem de uma melhor maneira.
-
--Create Stuff function carCreateTrainStuff ( ) car_marker_request = createMarker( 1507.69433, -1714.55761, 13.04687, "cylinder", 1.5, 250, 150, 50, 170) end addEventHandler ( "onResourceStart", resourceRoot, carCreateTrainStuff ) addEventHandler ( "onClientPedDamage", ped, function ( ) cancelEvent ( ) end ) --Test Gui function carCreateTestGUI ( hitElement ) if ( source == car_marker_request ) then triggerClientEvent ( hitElement, "carCreateTestGUI", hitElement ) end end addEventHandler ( "onMarkerHit", root, carCreateTestGUI ) --Create GUI function carCreateTestGUI ( ) car_window_main = guiCreateWindow(0.3,0.2,0.2,0.3,"Criador de Carros",true) car_window_main_button_criar = guiCreateButton(0.010,0.85,0.6,0.130,"Criar",true,car_window_main) car_window_main_button_x = guiCreateButton(0.85,0.140,0.120,0.10,"X",true,car_window_main) showCursor ( true ) function createPlayerList () local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) local column = guiGridListAddColumn( playerList, "Player", 0.85 ) if ( column ) for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) end addEvent ( "carCreateTestGUI", true ) addEventHandler ( "carCreateTestGUI", root, carCreateTestGUI ) --Destroy GUI function carDestroyTestGUI ( ) if isElement ( car_window_main ) then destroyElement ( car_window_main ) end if isElement ( car_window_main_button_criar ) then destroyElement ( car_window_main_button_criar ) end if isElement ( car_window_main_button_x ) then destroyElement ( car_window_main_button_x ) end showCursor ( false ) end --On test Window Click function carOnTestWindowClick ( ) if ( source == car_window_main_button_criar ) then triggerServerEvent ( "carCreateTest", localPlayer ) carDestroyTestGUI ( ) elseif ( source == car_window_main_button_x ) then carDestroyTestGUI ( ) end end addEventHandler ( "onClientGUIClick", root, carOnTestWindowClick ) This creates cars. Someone could help me? I wanted when the car is created automatically enter the car.
-
maybe local policeCars = { } -- We create a table. --Create Stuff function testCreateTrainStuff ( ) test_marker_request = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170) createBlip ( 1543.98962, -1670.46398, 13.55753, 41) ped = createPed (280,1543.98962,-1670.46398,13.55753, 90) setElementFrozen ( ped, true ) end addEventHandler ( "onResourceStart", resourceRoot, testCreateTrainStuff ) addEventHandler ( "onClientPedDamage", ped, function ( ) cancelEvent ( ) end ) addEventHandler ( 'onMarkerHit', root,) function teamName ( source, key, uElement) local playerTeam = getPlayerTeam ( source ) if ( Policia ) then local oldTeamName = getTeamName ( Policia ) setTeamName ( Policia, uElement ) else local id = getElementModel ( uElement ) if id == 280 then end --Create Vehicle function testCreateTest ( ) if ( isElement ( policeCars[ source ] ) ) then -- We check if the player already has a car spawned. destroyElement ( policeCars[ source ] ) -- If so, we destroy it. end policeCars[ source ] = createVehicle ( 596, 1535.05615, -1675.60766, 13.56008 ) -- We create the vehicle stored in 'policeCars' table. outputChatBox ("Você virou Policial", source, 255, 0, 0 ) end addEvent ( "testCreateTest", true ) addEventHandler ( "testCreateTest", root, testCreateTest ) --Test Gui function testCreateTestGUI ( hitElement ) if ( source == test_marker_request ) then triggerClientEvent ( hitElement, "testCreateTestGUI", hitElement ) end end addEventHandler ( "onMarkerHit", root, testCreateTestGUI )
-
local policeCars = { } -- We create a table. --Create Stuff function testCreateTrainStuff ( ) test_marker_request = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170) createBlip ( 1543.98962, -1670.46398, 13.55753, 41) ped = createPed (280,1543.98962,-1670.46398,13.55753, 90) setElementFrozen ( ped, true ) end addEventHandler ( "onResourceStart", resourceRoot, testCreateTrainStuff ) addEventHandler ( "onClientPedDamage", ped, function ( ) cancelEvent ( ) end ) addEventHandler ( 'onMarkerHit', root, function ( uElement ) if source == myMarker then local uTeam = getPlayerTeam ( uElement ) if uTeam and getTeamName( uTeam ) == 'Policia' and getElementModel ( uElement ) == 280 then outputChatBox 'TODO' end end end ) --Create Vehicle function testCreateTest ( ) if ( isElement ( policeCars[ source ] ) ) then -- We check if the player already has a car spawned. destroyElement ( policeCars[ source ] ) -- If so, we destroy it. end policeCars[ source ] = createVehicle ( 596, 1535.05615, -1675.60766, 13.56008 ) -- We create the vehicle stored in 'policeCars' table. outputChatBox ("Você virou Policial", source, 255, 0, 0 ) end addEvent ( "testCreateTest", true ) addEventHandler ( "testCreateTest", root, testCreateTest ) --Test Gui function testCreateTestGUI ( hitElement ) if ( source == test_marker_request ) then triggerClientEvent ( hitElement, "testCreateTestGUI", hitElement ) end end addEventHandler ( "onMarkerHit", root, testCreateTestGUI ) How do I get to get a team and a skin, I try but I can not.
-
I remind you that this topic was created in a specific category for this? The player can create a topic here when find some kind of problem is to produce the script or if find any errors. Make the script for free? I would use a term subtle to talk about this. A player who does not know the composition of the script can not create it.
-
Car2 --Create GUI function carCreateTestGUI ( ) car_window_main = guiCreateWindow(0.3,0.2,0.2,0.3,"Criador de Carros",true) car_window_main_button_criar = guiCreateButton(0.010,0.85,0.6,0.130,"Criar",true,car_window_main) car_window_main_button_x = guiCreateButton(0.85,0.140,0.120,0.10,"X",true,car_window_main) showCursor ( true ) end addEvent ( "carCreateTestGUI", true ) addEventHandler ( "carCreateTestGUI", root, carCreateTestGUI ) --Destroy GUI function carDestroyTestGUI ( ) if isElement ( car_window_main ) then destroyElement ( car_window_main ) end if isElement ( car_window_main_button_criar ) then destroyElement ( car_window_main_button_x ) end if isElement ( car_window_main_button_x ) then destroyElement ( car_window_main_button_x ) end showCursor ( false ) end --On test Window Click function carOnTestWindowClick ( ) if ( source == car_window_main_button_criar ) then triggerServerEvent ( "carCreateTest", localPlayer ) carDestroyTestGUI ( ) elseif ( source == car_window_main_button_x ) then carDestroyTestGUI ( ) end end addEventHandler ( "onClientGUIClick", root, carOnTestWindowClick ) Car1 --Create Stuff function carCreateTrainStuff ( ) car_marker_request = createMarker( 1507.69433, -1714.55761, 13.04687, "cylinder", 1.5, 250, 150, 50, 170) end addEventHandler ( "onResourceStart", resourceRoot, carCreateTrainStuff ) addEventHandler ( "onClientPedDamage", ped, function ( ) cancelEvent ( ) end ) --Test Gui function carCreateTestGUI ( hitElement ) if ( source == car_marker_request ) then triggerClientEvent ( hitElement, "carCreateTestGUI", hitElement ) end end addEventHandler ( "onMarkerHit", root, carCreateTestGUI ) how could I create a list of vehiculos to create? someone could create a list with two vehiculos and when to create the player get on the vehicle?
-
function painel_policial () guiCreateWindow ( 230,200,250,200, "Information", true ) guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "OK", true, painel_policial ) guiWindowSetSizable(painel_policia,false) guiWindowSetMovable ( painel_policial, false ) guiWindowSetSizable ( painel_policial, false ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), painel_policial ) function painelVisible() if (guiGetVisible(painel_policial) == false) then guiSetVisible(painel_policial,true) showCursor(true) else guiSetVisible(painel_policial,false) showCursor(false) end end bindKey("F5","down",painelVisible) what is wrong?
-
you edited the file so that the player gets the car's name as he entered, should be the name of the car that the player purchased.
-
draken friend you could bring open the name of the car purchased but the table has an error it does not close by pressing f3
-
still has an error, the name "nenhum" is not replaced by the name of the vehicle.
-
the name of the vehicle is not found.
-
GUIEditor_Label = {} theWindow = guiCreateWindow(300,200,250,200,"Sistema de Veiculos",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") spawnBut = guiCreateButton(0.005, 0.100, 0.6, 0.130, "Vehiculo :", true, theWindow, 255, 0, 0) guiCreateButton(0.005, 0.250, 0.6, 0.130, "Vehiculo :", true, theWindow, 255, 0, 0) guiCreateButton(0.005, 0.400, 0.6, 0.130, "Vehiculo :", true, theWindow, 255, 0, 0) guiCreateButton(0.650,0.100,0.3,0.2,"Trancar / Destrancar",true,theWindow) guiCreateButton(0.650,0.330,0.3,0.2,"Blip",true,theWindow) destroyBut = guiCreateButton(0.650,0.560,0.3,0.2,"Visivel / Invisivel",true,theWindow) guiCreateButton(0.005,0.560,0.3,0.2,"Vender",true,theWindow) guiCreateButton(0.345,0.560,0.3,0.2,"Seila",true,theWindow) guiCreateLabel(0.080, 0.780, 0.6, 0.2, "Tabela feita por Ninguem", true, theWindow, 255, 0, 0) addEventHandler("onClientGUIClick", spawnBut, root, function () local vehicle = getPedOccupiedVehicle(source) if vehicle then guiSetText( spawnBut, "Veiculo: "..vehicle.."" ) else guiSetText( spawnBut, "Veiculo: nenhum" ) end end ) function resourceStart () bindKey ("F3", "down", menuShow) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function menuShow () visableornot = guiGetVisible (theWindow) if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end addEvent ("carSpawn", true) addEvent ("carDestroy", true) function guiClick (button, state, absoluteX, absoluteY) if (source == spawnBut) then triggerServerEvent ("carSpawn", getLocalPlayer()) elseif (source == destroyBut) then triggerServerEvent ("carDestroy", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) dont work
