-
Posts
2,753 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Captain Cody
-
You don't have to use onClientPreRender, you could throw it server side with a very low timer. "50ms" which Is 20x smaller then a secound. I'm not quite sure your eyes could spot the difference.
-
It should be located in the resource "Race"
-
This is the variable you need to change. local FLIGHT_ANIMLIB = "swim"
-
I wrote that at 12 PM forgive me.
-
function prison(player, cmd) if player then wantedlevel = getPlayerWantedLevel(Player) local playerTeam = getPlayerTeam ( Police Service ) local playerTeam2 = getPlayerTeam ( Criminals ) local jX, jY, jZ = getElementPosition (playerTeam) local pX, pY, pZ = getElementPosition (playerTeam2) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if ( wantedlevel == 0 ) then exports.CORtexts:output("You can't use this command when not wanted!", player, 0, 255, 0) return end if dist > 149 then exports.CORtexts:output("You can't use this command when near a cop !", plyer, 0, 255, 0) return end end exports.CIFprison:sendPlayerToPrison(player, false) end addCommandHandler("surrender", prison)
-
function staffcommand (player, command) if getElementType(player) == "player" then if (isPedInVehicle(player) and getPedOccupiedVehicle (player)) then return outputChatBox("You cannot use this command inside a vehicle.", player, 255, 0, 0, true) end local account = getPlayerAccount(player) if isGuestAccount(account) then local accName = getAccountName(account) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ("Admin"))) then setElementPosition ( player, 3749.9094238281, -194.06666564941, 5.3276481628418 ) else outputChatBox("Only staff can use this command.", player, 255, 0, 0) end end end end addCommandHandler("staffland", staffcommand)
-
Well if you could be more clear about what you are asking maybe just maybe I could actually help. I'm tired of all these people in the English scripting section that don't speak a word of proper English asking for scripting help. And if you want to question my scripting abilities, please go ahead and take a look at the first link in my signature.
-
Yes but what's the issue, there doesn't seam to be any issues I can spot off the bat other then the fact that I suggest you replace source server side with client.
-
What's the issue you are having?
-
Instead of onClientColShapeHit, use onColShapeHit .....
-
Why don't you just do this server side?
-
for i,v in pairs(getElementsByType("player") do local account = getPlayerAccount(v) local acountName = getAccountName(v) if isObjectInACLGroup ("user."..acountName , aclGetGroup ( "VIP" ) ) then --- Continue end end
-
Oh sorry I read that wrong, what ever is hosting the server needs better internet, this is due to desyncing.
-
Oh if so, he either needs better internet, or there's something wrong in the mta installation.
-
Get a house with better internet.
-
table = {} for i,v in pairs (getAccounts()) do local time = getAccountData(v, "on_time") table.insert(table,{v,time}) end table.sort(table) local 1= table[1] local 2= table[2] local 3= table[3] local first = getAccountName(1[1]) local secound= getAccountName(2[1]) local third= getAccountName(3[1]) Not tested, and could be put together better, but quick example.
-
Well there a few other things I did then just omit out player name. Mine runs a check to see if any thing is saved for player money. Removes a useless playername at bottom, and cleans up a few bits of the code
-
Well yeh wasn't really paying attention there I did that as soon as I woke up and noticed this.
-
function playerQuit() local playeracc = getPlayerAccount( source ) if (playeracc) and not isGuestAccount(playeracc) then --local playername = getPlayerName( source ) local playercash = tonumber(getPlayerMoney( source )) setAccountData(playeracc, "cash", playercash) end setPlayerMoney(source,0) end function playerLogin() local playername = getPlayerName( source ) local playeracc = getPlayerAccount( source ) if (playeracc) and not isGuestAccount(playeracc) then local money = getAccountData(playeracc, "cash") if money then setPlayerMoney( source, money ) end end end addEventHandler( "onPlayerLogin", getRootElement(), playerLogin ) addEventHandler( "onPlayerQuit", getRootElement(), playerQuit ) addEventHandler( "onPlayerLogout", getRootElement(), playerQuit )
-
When the train is spawned, trigger a client side event setElementStreamable(false), and add a check point on the track (Or set a timer) that will set it not streamable everytime it triggers for new players. Basicly what this does, is prevent the train from streaming out, fixing your issue.
-
I don't think 2016 will work correctly with SA models. I use 2013, and 2017 haven't tried with 2016
-
local lowobject = createObject (id,x,y,z,xr,yr,zr,true) That is the lod.
-
All you have to do is local id,x,y,z,xr,yr,zr = --- Put id, x,y,z, and rotation here local object = createObject (id,x,y,z,xr,yr,zr) local lowobject = createObject (id,x,y,z,xr,yr,zr,true) setLowLODElement (object ,lowobject ) engineSetModelLODDistance (id,170) If you want to put lots of object with low lods, I'd recommend you using 1.6 nightly. - Will help some but you will still need a decent loading system
-
I'm not sure really.
-
Here's something that may work, replacing pick up (If you don't plan on using said pickup) then using create object to spawn it http://dev.prineside.com/en/gtasa_samp_ ... and-icons/ But watch out for the ones marked with because they don't exist in MTA.
