aintaro
Members-
Posts
135 -
Joined
-
Last visited
Everything posted by aintaro
-
Every player has he's own vehicle, so before spawning the vehicle i want the player to see a dummy version of the vehicle client dided before we spawn it server sided
-
Thats exactly why I want to create a Vehicle client sided, I want the user to preview the car before he actually spawns it
-
Ohh ok thats why..can you explain why that is?
-
Hello guys, my vehicle color won't change to the color I want it to be, here is my simple command to spawn a vehicle with a certain color : function colorVehicle() local x,y,z = getElementPosition(getLocalPlayer()) -- get the position of the player x = x + 5 local vehicleShowz = createVehicle ( 491, x, y, z) setVehicleColor(vehicleShowz, 255, 0, 0) end addCommandHandler("spawnVehicle", colorVehicle) Anybody help? Thanks in addvance, Aintaro
-
thanks man ,I didn't know that
-
Alright, thanks a lot for sharing your opinion!
-
Ello guys, Aintaro here with another question for you... How would you setup the saving for vehicle attributes? Option 1: xml file for every user with all the owned vehiclrd in it and attributes Option 2: using the mta database and save the attributes server sided for every player Option 3: sql Option 4: something else? Thanks in advance, Greetz aintaro
-
Hello guys, The problem is I want my server sided function to finish before it executes the triggerClientEvent. Here is the code server sided: local vc1, vc2, vc3, vc4 function spawnOwnedVehicle(source, commandName, vehicleType) for y = 1, table.getn(playerVehicle) do outputChatBox(vehicleType) --if (playerVehicle[y] == tonumber(vehicleType)) then --found vehicle now load colors plx for x = 1, 5 do --outputChatBox(tostring(playerVehicle[y][x])) if (x == 2) then vc1 = playerVehicle[y][x] --loading colors outputChatBox(vc1) elseif (x == 3) then vc2 = playerVehicle[y][x] --loading colors elseif( x== 4) then vc3 = playerVehicle[y][x] --loading colors elseif (x== 5) then vc4 = playerVehicle[y][x] --loading colors end end --end end outputChatBox("Server send the trigger") triggerClientEvent ( "spawnPersonalVehicle", getRootElement(), spawnPersonalVehicle, vehicleType, vc1, vc2, vc3, vc4) --send the configs to the client so we can spawn this vehicle end addCommandHandler("spawnvehicles", spawnOwnedVehicle, source) code client sided : function spawnPersonalVehicle(localPlayer, pvehicleId, pvc1, pvc2 ,pvc3, pvc4) outputChatBox("Client got the server trigger") outputChatBox(pvehicleId) outputChatBox("pvc1"..pvc1) outputChatBox("pvc2"..pvc2) outputChatBox("pvc3"..pvc3) outputChatBox("pvc4"..pvc4) local x, y , z = getElementPosition(source) local personalVehicle = createVehicle ( getVehicleNameFromModel ( tonumber(pvehicleId) ), x + 5, y, z) setVehicleColor ( personalVehicle, tonumber(pvc1), tonumber(pvc2), tonumber(pvc3), tonumber(pvc4)) end addEvent("spawnPersonalVehicle", true) addEventHandler("spawnPersonalVehicle", root, spawnPersonalVehicle) output : Client got the server trigger [some parameters] Server send the trigger ps : No idea why lua tags are not working Thanks in advance, Greetz Aintaro
-
Alright, thanks
-
Hello guys, Does anybody know how I run multiple clients on the same machine for testing purpose? thanks in advance, Aintaro
-
Hello guys, When I place a ped with the mapeditor on the map, I want to adjust he's Z rotation, but it does nothing, the ped keeps facing teh same direction. Any help?
-
Yeah thanks for letting me know, I did use it exactly like that
-
Hello guys, How would I write a simple dxdraw method where the font size is adjusted to the screen resolution? I know dxdraw has a optional scaleX and scaleY as arguments for the method but I just don't know how to write it. Thanks , aintaro
-
The Interfaces look very nice man, keep up the great work
-
ohh, I think i'm running 1.3
-
@solidsnake: yes @jr10 : Oh to bad, i'll have to wait until 1.4 then, is there no cheap fix for it? cuz I hate when the server keeps saying event already running
-
Hello mta people, How do I check if an event is already running? Thanks, Aintaro
-
thanks arnold, thats what I wanted
-
those would only tell if we hit a marker, but not a CERTAIN marker
-
Hello guys, Lets say you have 100 markers on the map, how would you go and write a code that checks if a CERTAIN marker has been hit by the player? thanks in advance, greetz aintaro
-
oh thats right, makes sense, thanks again mate, impressive knowledge of mta you have there up in your brain
-
Hello guys, I was wondering what should be put client sided and what server sided? For example: is it safe to give a player money client sided when he gets in a mark? Can you set a player skin client sided? is that safe? I'm a bit confused on what to add client sided and what server sided. If sombody can clarifiy a bit It would help my server architecture a lot! Thanks in advance, Aintaro
-
Omg I feel so stupid right now, *Shoot me in the head please*
-
Hello guys, I've been trying to fix this error for a few days now and still nothing, it drives me crazy can sombody please clarify this: here is my client side code : function createPlayerList () -- Create the grid list shoppingList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) -- Create a players column in the list local column = guiGridListAddColumn( shoppingList, "Player", 0.85 ) if ( column ) then -- If the column has been created, fill it with players for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( shoppingList ) guiGridListSetItemText ( shoppingList, row, column, getPlayerName ( playeritem ), false, false ) local playerName = guiGridListGetItemText ( shoppingList,0, 1) outputChatBox(playerName) end addEventHandler ( "onClientGUIClick", shoppingList, click ) end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end addEventHandler ( "onClientResourceStart", getRootElement(), createPlayerList ) function click () local playerName = guiGridListGetItemText ( shoppingList, guiGridListGetSelectedItem ( shoppingList ), 1 ) ouputChatBox("name : " ..playerName) end here is my output of my debugscript :
