-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
np, I'll post back or edit this post when I have an idea This is annoying, it looks so easy but complex
-
ok, here's an example: addEventHandler("onClientPedWasted",root,function() if(isElement(label))then resetTimer(timer) guiSetText(label,killer" killed "..source) else label = createLabel() timer = setTimer(destroyElement,7000,1,label) end end)
-
lol, I thought it would work this time I'll keep thinking
-
you don't have to do that, you could use a timer to destroy the label and if the player kills another person before the label could be removed, then you could reset the timer and set the label to the new killer and the player killed, use these: setTimer() --set a timer so the label could disapper resetTimer() -- reset the timer if the player kills another person again --then guiSetText() -- set the label to the player that killed again
-
try this: function updateLocations ( location ) for i=0, guiGridListGetRowCount(locationsList)do -- loop through the gridlist if(location~=guiGridListGetItemText(locationsList,i,1))then --if the location name is not inside the gridlist then guiGridListSetItemText ( locationsList, guiGridListAddRow ( locationsList ), 1, location, false, false ) -- add a row and set it by the location name end end end
-
wait, so the server sends a table to this function, am I right?
-
Well, I think this would be a good idea then, but it's not as easy as it looks
-
lol, sorry, When is this script being triggered?
-
You've added a row even when it's the same text, try this: function updateLocations ( location ) for i=0, guiGridListGetRowCount(locationsList)do if(guiGridListGetItemText(locationsList,i,1)==location)then guiGridListRemoveRow(locationsList,i) elseif(guiGridListGetItemText(locationsList,i,1)~=location)then local row2 = guiGridListAddRow ( locationsList ) guiGridListSetItemText ( locationsList, row2, 1, location, false, false ) end end end
-
lol, ok, lets see how it works from the beginning, Delete the gta_sa.set located in your "My Document\GTA San Andreas User Files"
-
I could see you've been using the wiki, here:OnVehicleStartEnter try this: local allowedGroups = { ["FBI"]=true } col1 = createColSphere ( 927.4365234375, -1022.5947265625, 35.913665771484, 27.5 ) gate1 = createObject (3113, 941.1669921875, -1012.3310546875, 32.369918823242, 0, 15, 272.5) function openGate1 ( player ) if ( allowedGroups[getElementData ( player, "FBI" )] ) then moveObject (gate1, 941.1669921875, -1012.3310546875, 21.369918823242, 0, 15, 272.5 ) addEventHandler("onColShapeLeave", col1, closeGate1) -- add the event of leaving the colshape if it's an FBI end end addEventHandler("onColShapeHit", col1, openGate1) function closeGate1() moveObject(gate1, 3037, 941.1669921875, -1012.3310546875, 32.369918823242, 0, 15, 272.5) removeEventHandler("onColShapeLeave",col1,closeGate1) -- remove it after the gate is closed end
-
It might improve the smoothness on your MTA, try it... Try playing around with the settings to improve your gaming.
-
for i=0, guiGridListGetRowCount(GRIDLIST)do if(guiGridListGetItemText(GRIDLIST,i,1)==THE STRING TO CHECK)then guiGridListRemoveRow(GRIDLIST,i) end end
-
When you add a group then make an ACL for it, then you could list the group rights, here: name="command.redo" access="true" /> You would need to add this to your group ACL
-
Found it: http://www.bing.com/search?q=VC%20in%20 ... owAppsUI=1 actual mod: http://www.gtagarage.com/mods/show.php?id=10709 Youtube:
-
lol, Use getTickCount() to start a tick then create another one and divide it by 1000
-
karthik184 said about this. Lua is case sensitive! Thanks Kenix, never seen that, I'm still having problems with my Notepad++ : viewtopic.php?f=91&t=43141&hilit=+Notepad#p435435 Anyways, what are you trying to do Ninja? Are you trying enable both or are you trying to enable 1 each time?
-
try this: --Made by Ninja-- boostTimer = false local currentlyBoosting = false function onCarDownResourceStart(resource) bindKey("lalt", "down", startBoost) bindKey("lalt", "up", stopBoost) bindKey("lshift", "down", startBoost2) bindKey("lshift", "up", stopBoost2) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onCarDownResourceStart) function startBoost (key, keyState) local vehicle = getPedOccupiedVehicle (localPlayer) if ( vehicle ) then if ( getVehicleController ( vehicle ) == getLocalPlayer() ) then boostTimer = setTimer(startCarBoost, 50, 0, vehicle) --outputChatBox ( "boostTimer=" .. tostring(boostTimer) ) currentlyBoosting = true else outputChatBox( "You need to be the driver!", 255, 0, 0 ) end end end function startCarBoost(vehicle) local vehSpeedX, vehSpeedY, vehSpeedZ = getElementVelocity ( vehicle ) setElementVelocity ( vehicle, vehSpeedX*1.1, vehSpeedY*1.1, vehSpeedZ*1) end function startBoost2 (key, keyState) local vehicle = getPedOccupiedVehicle ( getLocalPlayer () ) if ( vehicle ) then if ( getVehicleController ( vehicle ) == getLocalPlayer () ) then boostTimer = setTimer(startCarBoost2, 50, 0, vehicle) --outputChatBox ( "boostTimer=" .. tostring(boostTimer) ) currentlyBoosting = true else outputChatBox( "You need to be the driver!", 255, 0, 0 ) end end end function startCarBoost2(vehicle) local vehSpeedX, vehSpeedY, vehSpeedZ = getElementVelocity ( vehicle ) setElementVelocity ( vehicle, vehSpeedX*1, vehSpeedY*1, vehSpeedZ*1.1) end function stopBoost( key, keystate ) if ( currentlyBoosting == true ) then --outputChatBox ( "boostTimer=" .. tostring(boostTimer) ) killTimer( boostTimer ) currentlyBoosting = false boostTimer = false end end function stopBoost2( key, keystate ) if ( currentlyBoosting == true) then --outputChatBox ( "boostTimer=" .. tostring(boostTimer) ) killTimer( boostTimer ) boostTimer = false currentlyBoosting = false end end
-
Here's a better example: local marker = createMarker(X,Y,Z) setElementInterior(marker, 2,X,Y,Z)
-
ok, this is sooooooooooo off-topic... twitch97, try adding: fadeCamera(true) in the s_account_system.lua If you don't know where to put it, post the script or add: addEventHandler("onPlayerLogin",root,function() fadeCamera(true) end)
-
Sorry, but ACL is a Access Control List, this would allow who ever to do what ever the group acl is set to. More Info: ACL
-
The only thing I could says is setting your Resolution to 800x600x32