-
Posts
2,608 -
Joined
-
Last visited
Everything posted by 12p
-
what do you mean?
-
No problems =)
-
https://wiki.multitheftauto.com/wiki/CreateVehicle
-
I've began to continue this gamemode! Hope you give me some support
-
Maybe using events (onPlayerVehicleEnter ) you could sync it (or timers).
-
guiGetText
-
Wojak, as you deleted your post, I have to edit this. I did that. Now it doesn't has any debug error... But zombies doesn't spawn
-
WTF? You mean to create a 3D GUI and attach it to a vehicle?
-
This script works fine: function createMap () if not getResourceFromName("minecraftmap") then mapResource = createResource ("minecraftmap") end mapFile = addResourceMap (":minecraftmap/map.map") return mapFile end The only problem is that meta.xml can't find the map when it is created... So I tried to do this: function createMap () if not getResourceFromName("minecraftmap") then mapResource = createResource ("minecraftmap") end mapFile = addResourceMap (":minecraftmap/map.map") removeResourceFile (mapResource,"meta.xml") local meta = xmlCreateFile (":minecraftmap/meta.xml","meta") local mapNode = xmlCreateChild (meta,"map") xmlNodeSetAttribute (mapNode,"src","map.map") xmlNodeSetAttribute (mapNode,"dimension","0") return mapFile end But nothing happens. Maybe it's a bug of MTA? PS: This is meta.xml looking when I create the map: <meta> <map src="" dimension="0" /> </meta> PS2: Can u believe this is the first time I use XML functions and map functions?
-
If "active" means "alive", this will work: https://wiki.multitheftauto.com/wiki/GetAlivePlayers_%28Client%29
-
1. We're not gays (at least, I don't, maybe you were talking about yourself?) 2. Looks like you think you're pro in scripting, but you aren't. 3. Most of us, the REAL scripters, have work. 4. Nobody will try to contact you if you treat us like that, simple life-less employees. 5. Sorry, SolidSnake, I replied same thing as you
-
I found a bug... damn? ERROR: zombies/zombie_server.lua:373: attempt to compare number with string This gets repeated every some seconds... Please check it Slothman, this is the problem: if (table.getn( allzombies )+pacecount < newZombieLimit ) and (ZombieStreaming == 1) then I've found the problem is "newZombieLimit", I've tried to fix it but nothing.
-
Check BLACK local playerData = {} function getPlayerVehicle (player) if playerData[player] then return playerData[player].vehicle -- maybe you can just return this, but dunno if it triggers error else return nil end end function createPlayerData (player) if playerData[player] then return end playerData[player] = {} end function destroyVehicle (player) if playerData[player] then if playerData[player].vehicle then destroyElement (playerData[player].vehicle) playerData[player].vehicle = nil else return false end end end addEvent ("carBuy", true) addEventHandler ("carBuy", getRootElement(), function(id2, cost2, name2,x, y, z, sRz, thePlayer) if (getPlayerMoney (source) >= tonumber(cost2)) then outputChatBox ("Achat de " .. name2, source, 255, 0, 0, false) outputChatBox ("Prix: " .. cost2, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (cost2)) local x,y,z = getElementPosition (source) local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz ) [b]destroyVehicle (thePlayer)[/b] --"player" doesn't exist here, I replace it for "thePlayer" playerData[thePlayer].vehicle = createVehicle (vehicle) warpPedIntoVehicle(source, vehicle) local blii = createBlipAttachedTo ( vehicle, 56, source ) setElementVisibleTo ( blii, getRootElement ( ), false ) setElementVisibleTo ( blii, source, true ) else outputChatBox ("Vous ne pouvez acheter ce produit [pas assez d'argent]", source, 255, 0, 0, false) end end)
-
yes, but will destroy every car, even the player owned... Use getElementData getVehicleOccupant
-
local vehicles = getElementsByType("vehicle") for i,v in ipairs (vehicles) do --Anything you want here, for each vehicle (it must be "v") end
-
he doesn't mean that, if I'm right!
-
It won't help, as people is stupid (try it, anyway people won't stop uploading stupid carmods).
-
What function do you want to "export"?
-
I think he added that event, actually...
-
Before all. Please organize your script! like this: function() outputChatBox("Respawning in 5 seconds...", source) setTimer( function() spawnPlayer(source, 1959.55, -1714.46, 17) fadeCamera(source, true) setCameraTarget(source, source) end,5000,1,[b]source[/b]) end)--"source" is a element that must be passed to the setTimer function
-
yes, he absolutelly did.
-
I will test. Thanks for fast answer EDIT (sorry and excuse me, I have to xpress my real thinking): F^CK YEAH MATE! That's the thing I wanted to do, thanks a f^cking lot!
-
Suppose we have set the camera matrix. And the player is facing to another point, not the same as the camera. Something like this: Well, how to set the right ped rotation, so he will be pointing at the camera facing point? (setPedAimTarget or setPedLookAt doesn't help me)