-
Posts
240 -
Joined
-
Last visited
Everything posted by Puma
-
I don't use Skype, if you want to talk, PM me on this forum .
-
http://www.xfire.com/videos/5f1481 Just the concept, it's far from perfect. If there's anyone who wants to continue developing it, let me know . What it does: When you enter a vehicle, it sets the transmission to gear 1. While in gear 1, your top speed is somewhere around 33% of the original top speed, but the acceleration is much higher than the original acceleration. Lower gears have a higher top speed, but lower acceleration and visa versa.
-
No. You need to add: addEvent ( "onClientMapStarting", true ) Above: addEventHandler ( 'onClientMapStarting', root, zaa) Every event that isn't a default MTA event must be added using addEvent.
-
Could you show the creatingLoginWindow function?
-
So, line 4 should be: if result and #result == 0 then Something else: your MySQL is wrong. login and haslo arguments are strings. If you put it in the query, you need to add ' ' around the string. In a MySQL query, all string-values must be between ' '. I guess login is an username, for example "Puma", so then it should be 'Puma' in the MySQL query and not Puma (without ' '). Numbers do not need ' '. So this: "SELECT login FROM konta WHERE login = "..login Should be this: "SELECT login FROM konta WHERE login = '"..login.."'"
-
What vehicle do you want to check health for?
-
if ( modernWNDLogin ~= nil ) then That's just plain stupid. Try this instead: if modernWNDLogin then
-
Read this page: https://wiki.multitheftauto.com/wiki/GetElementHealth
-
He is asking for someone to set up an entire gamemode for his server. Nobody's gonna do that. I'm not hating, I'm just stating the truth.
-
There is no function for that, unless you make it yourself.
-
Did you make the maps on MTA race or MTA DM?
-
It's not a function, you have to script it yourself and it's not an easy script if you want to do it properly.
-
I quote: "for all players online on server". His English is quite butt though.
-
Well, he said "when A player joins" so that would be not the player itself.
-
-
Last line of clientside script: "onPlayerJoin" Should be "onClientPlayerJoin" Remember this: All default clientside events have CLIENT in their name.
-
No. My script does exactly what you need, you just have to add some eventhandlers and changes some variables.
-
Easier as in a complete script?
-
If you want the ped to exactly walk into your steps at a distance, I would recommend this: onClientRender/onClientPreRender/setTimer: Let ped face towards you using https://wiki.multitheftauto.com/wiki/FindRotation (fill in your x,y and ped's x,y). Get distance between you and the ped using getDistanceBetweenPoints3D. When distance < x (followdistance), use setPedControlState to make the ped running, if he isn't already running to you. When distance > x, use setPedControlState to stop the ped from running, if he is still running. Ped will always be looking at you, when you are getting too far away, he will keep running to you until distance between you and him < x.
-
No duh it doesn't work on it's own, I expected you to implement it in your script. You only asked for a way how do do it and I gave an example.
-
I made one recently, but I'm not gonna share it . Unless you start talking dollars lol.
-
This loops through all players and the money on their accounts to 0. for i, p in pairs ( getElementsByType("player") ) do local account = getPlayerAccount(p) if account and not isGuestAccount(account) then setAccountData(account, "ADmoney", 0) end end Put it in your script where you need it to be.
-
You mean when player1 spawns an Infernus, spawns a NRG-500 and spawns another Infernus, the first spawned Infernus is destroyed? Easy. Just use a table. Script comes down to this: -- create a table in which we're going to put the vehicle-tables for players playerVehicles = {} -- create a table in which we're going to save the players that spawned the vehicles vehiclePlayers = {} function playerJoin() -- when player joins, create the player's vehicletable playerVehicles[source] = {} end function playerQuit() -- loop through all the vehicles the player spawned and destroy them for model, vehicle in pairs ( playerVehicles[source] ) do if vehicle and isElement(vehicle) then vehiclePlayers[vehicle] = nil destroyElement ( vehicle ) end end -- destroy the player's vehicleable when he leaves playerVehicles[source] = nil end -- when a vehicle is spawned by a player function playerSpawnsVehicle(player, vehicleElement) -- get the spawned vehicle's model local vehicleModel = getVehicleModel(vehicleElement) -- check if there is a value for the vehiclemodel in the player's vehicletable if playerVehicles[player][vehicleModel] and isElement(playerVehicles[player][vehicleModel]) then -- if it exists, destroy that earlier spawned vehicle destroyElement ( playerVehicles[player][vehicleModel] ) end -- set the new spawned vehicle as element for the vehiclemodel in the player's vehicletable playerVehicles[player][vehicleModel] = vehicleElement -- save who created the vehicle vehiclePlayers[vehicleElement] = player end -- if a vehicle is destroyed, delete it from the table from the player that spawned it function vehicleDestroyed() -- get player who spawned the vehicle local player = vehiclePlayers[source] -- destroy data in the player's table, if the player still exists if player and isElement(player) then playerVehicles[player][getElementModel(source)] = nil end -- remove this vehicle from the vehiclePlayers table vehiclePlayers[source] = nil end I didn't add function handlers, the function-names should explain where to put the parts in your script.
-
"Pro scripters" have got better things to do. If you want to get their attention, you better start talking in dollars instead of words.