-
Posts
6,086 -
Joined
-
Last visited
-
Days Won
215
Everything posted by IIYAMA
-
in a .lua file. (client side)
-
This helps a little: for i, o in pairs (getElementsByType ("object")) do engineSetModelLODDistance ( getElementModel(o), 300 ) end If you want a specific object to be loaded very very fast, you can also choose for a LOW lod object + a normal object. object createObject ( int modelid, float x, float y, float z, [ float rx, float ry, float rz, bool isLowLOD = false ] )
-
local bodyParts = { [9]=true,[8]=true, [7]=true,[6]=true, [5]=true,[4]=true, [3]=true }--table function battlelogger ( attacker, weapon, bodypart, loss ) if bodyParts[bodypart] then -- check if the value is 3 t/m 9. end-- don't forget the end. end timers for every player local myTimers = {} -- create a place(table) where you store the userdata from the timers. So you will be able to stop the timer for every single player. ------------------------------------------------------------------------------------------------------ -- source is the player that got damaged when you use the event "onPlayerDamage". ------------------------------------------------------------------------------------------------------- -- check if you haven't already a timer that is working with this player. if not myTimers[source] then -- here we set a timer the data location is the player him self also we call it the key or index value. So if you know the player you also know what timer he uses. myTimers[source] = setTimer(reduceCountdown, 1000, countdown) -- and of course an end for every function, loop or "if" end
-
There are two* event's that can give you this information. "onClientPlayerDamage" "onClientPlayerWeaponFire" There is an third even on server side called onPlayerDamage, but that is more a delayed event from the "onClientPlayerDamage". and no I am not going to make a full code, for somebody who don't even try to script.
-
Well there are differed ways to do that, but you can try account data. setAccountData getAccountData People have to login to load the information. check when somebody is admin local account = getPlayerAccount(source) local accountName = getAccountName(account) if isObjectInACLGroup("user." .. accountName, aclGetGroup("Admin")) then outputChatBox("player is admin" ) end
-
it is the solution or another solution is onClientPlayerWeaponFire...... that is what I use. To kill people who can't afford stable connection and fps. addEventHandler ("onClientPlayerDamage",root, function (attacker) if source ~= attacker then end end)
-
You can also try: client + serverside? It reduces CPU lagg. You can use timers, but you are already needed to use direct x for showing the countdown. You can make this with getTickCount and onClientRender. So why not let the client calculate it and trigger it? (check it again on server side)
-
np. good luck with your script.
-
Don't call him on skype or don't awnser his call That's how he can track your ip.
-
TIP: I will recommend you to debug your script with outputDebugString, else your server logs will be bigger and it will take longer to start your server. That happened to me ones.
-
Maybe you should check the car height instead?
-
maybe: local dimension = getElementDimension(getElementsByType ("object")[1]) -- always objects are needed in the map local objects,dimension = getElementsByType ("object"),0 if objects then dimension = getElementDimension(objects[1]) end But it would be better to make a setting in the edf and gamemode.
-
I don't know why you return a boolean to table.sort, it is probably because I got another scripting style and I haven't used it that much. try this: table.sort( sortinfo, function(a,b) return a.checkpoint > b.checkpoint or ( a.checkpoint == (tonumber(distanceFromPlayerToCheckpoint(player, sortinfo[i].checkpoint)) or 0)) end ) updated.
-
1. I have seen dx and shader hud's and some hud changes that are added with the weapon txd's. But this is how you add txd files. https://wiki.multitheftauto.com/wiki/EngineImportTXD I don't really have modding experience. I have onces designed my own hud with dx, but that was a little bit laggy. 2.The editor hasn't been designed to do that. Maybe there is some unknow plugin, but I don't think so. Maybe you should check the modloader from Remi-x. https://community.multitheftauto.com/in ... ls&id=3016 3. You have first find out the resource that caused that. Nobody can give you that answer, because nobody can give you the right answers without the correct lines. I saw you installing lots of resouces, I hope you didn't give the unknow ones all admin.
-
= distanceFromPlayerToCheckpoint(player, sortinfo[i].checkpoint ) or 0
-
Het is misschien stil omdat kant en klare resources die goed met elkaar moeten samen werken niet voor de hand liggen.
-
When you make it global and recreate those vehicles, you will overwrite the vehicles(user-data). baggage = createVehicle ( 485, 1713.62378, 1458.48633, 10.73280, 0, 0,-3 ) baggage = createVehicle ( 485, 1713.62378, 1458.48633, 10.73280, 0, 0,-3 ) -- overwrite the data.
-
@Robbster That's not a problem, the problem you have to solve is "how to destroy them for every single player". and then we are going to talk about tables. Or other storage possibility's.
-
thank you! Players/server = RAM (temporary) Players = accountdata Server = mysql and SQL Right?
-
and if I want to store personal stuff, (player data). Is it recommended to use accountdata or MySOL?
-
Is MySQL also for data that will be executed lots and lots times? or is it better to use a table and store it in to the ram?(like normal tables) MySQL is more hard-drive work isn't?
-
Did you tried it with player's or vehicle's? btw tried a serverside object?
-
Yes this will cancel the map, because the map is the source. It is your code. addEvent("onMapStarting",true) addEventHandler("onMapStarting",getRootElement(), function ( ) if getResourceInfo(source, "type") == "map" then cancelEvent() end end) "onMapStarting" has nothing to do with the chatbox, I only finished the code that you made.
-
Because it is an error. addEvent("onMapStarting",true) addEventHandler("onMapStarting",getRootElement(), function ( mapInfo, mapOptions, gameOptions ) --the parameters values are in tables. if getResourceInfo(source, "type") == "map" then --* cancelEvent() end end) -- "onMapStarting" we are already talking about maps.* -- source is the map. Maybe you should check this: https://wiki.multitheftauto.com/index.ph ... ource:Race
-
np. Mr.Pres[T]ege is the best.