-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
Maybe use playerName = getPlayerName(source) function reason outputChatbox("player:" ..playerName.. "has disconnected") end addEventHandler("onPlayerQuit", source, reason) I'm a noob I just try to help if it's wrong i'll guess you'll get what I ment then.
-
i suggest to add onPlayerQuit part too, If they're dead and reconnect the timer continues
-
I'm still new so I don't know if i'm doing right but i try to help; function pickupUse (source) local pickup = createPickup(x, y, z, 3, 1239) -- Create a pickup usePickup(pickup,getRandomPlayer()) -- Make a random player use the pickup outputChatBox ( "INFO: This is a building from 1982", thePlayer ) -- output a message to the player end addEventHandler("onResourceStart", getRootElement(), pickupUse) I hope it works
-
Example: function onPickupHitFunction ( thePlayer ) if getPickupType ( source ) ~= 2 then return end -- if the pickup is no weapon, stop local ammo = getPickupAmmo ( source ) -- get the amount of ammo local weapon = getPickupWeapon ( source ) -- get the weapon of the pickup outputChatBox ( "You just picked up a " .. getWeaponNameFromID(weapon) .. " with " .. ammo .. " ammo", thePlayer ) -- output a message to the player end addEventHandler ( "onPickupHit", getRootElement(), onPickupHitFunction ) -- add an event handler for onPickupHit
-
voeg wat outputs toe (debuggen) Bv: outputChatbox of outputConsole Ik weet dit dankzij IIYAMA
-
So just this is enough; function nametagColorChange ( thePlayer ) setPlayerNametagColor ( thePlayer, 255, 255, 255) end addEventHandler ( "onResourceStart", nametagColorChange)
-
I'm now using this code i've made but it doesn't work; function chatPrefix( message, messageType ) if messageType == 0 then local playerTeam = aclGroupGetName("Admin") if playerTeam then local r, g, b = getTeamColor ( playerTeam ) local theName = getAccountName (getPlayerAccount (source)) outputChatBox( "[CR]".. theName ..": " .. message, getRootElement(), r, g, b, true ) outputServerLog("CHAT: "..theName..": "..message) cancelEvent() else local theName = getAccountName (getPlayerAccount (source)) outputChatBox( theName ..": " .. message, getRootElement(), 255, 255,255, true ) outputServerLog("CHAT: "..theName..": "..message) cancelEvent() end end end addEventHandler( "onPlayerChat", getRootElement(), chatPrefix ) function blockChatMessage() cancelEvent() end addEventHandler( "onPlayerChat", getRootElement(), blockChatMessage ) I outputs my message twice in chat in once in color and once in white.. No [CR] infront of my name also.
-
Hi, How can I remove the chat color? I want everyone to write in White and the Name also in white. Thanks.
-
Do you have skype? If so send me a PM
-
don't try to get posts when TAPL (in this case) already told it
-
Yes I know I thought to make it bold so you would see the line better but didn't work
-
function allPlayersPayDay() local allPlayers = getElementsByType("player") for index,value in ipairs(allPlayers) do givePlayerMoney ( value, 500 ) outputChatBox ( "---- Payday ----") [b]outputChatBox ( "You've earned €" value)[/b] outputChatBox ( "----------------") end end function onResourceStart(thisResource) setTimer ( allPlayersPayDay, 60000, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) at outputchatbox an expected ) at value
-
I didn't had any problems I've added the outputChatBox and everything worked (indeed weird) So I changed it to an outputConsole... problem solved
-
Yes but is deleting the GUI button or DxDraw enough?
-
Hi, How can I remove settings from the scoreboard?
-
Thx IIYAMA nice strategy to use outputChatbox to see where's the problem. Script fixed!
-
I did no errors otherwise i've posted them
-
Still doesn't work pa3ck the bus isn't destroyed and the freeze onClientMarker doesn't work
-
doesn't work (server side right?)
-
Hi, No errors only on bindKey "x" the car engine doesn't turn on/off
-
I'm a noob but maybe @ this; addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), function( ) for i, resources in ipairs(getResources()) do if ( ZAResources[getResourceName(resources)] ) then local resourceName = getResourceName(resources) local start = startResource ( resources ) if ( start ) then outputDebugString ( resourceName.." was started successfully." ) else outputDebugString ( resourceName.." Failed to Started.", 1 ) end end end end ) Normally if you stop the resource they should still run.
-
I'll post the full script here so you get a good overview Meta.xml busjob.lua busjob_c.lua No Console Errors, debugscript 3 is in the image (only one error) The things that need to happen but don't happen are: • Destroy the bus on Exit. • On ClientMarkerHit the bus should freeze for 5 seconds and won't be able to drive.
-
Tried still no freeze
-
EDIT: function setFrozen(thePlayer) local theVehicle = getPedOccupiedVehicle (thePlayer) if getPedOccupiedVehicle ( thePlayer ) then local playerVehicle = getPedOccupiedVehicle ( thePlayer ) setElementFrozen (theVehicle, true) end end setTimer(setFrozen, 5000, 1) addEventHandler("onClientMarkerHit", marker, setFrozen)
-
Edited: function setFrozen(thePlayer) local theVehicle = getPedOccupiedVehicle (thePlayer) if getPedOccupiedVehicle ( thePlayer ) then local playerVehicle = getPzsOccupiedVehicle ( thePlayer ) setElementFrozen (theVehicle, true) end end setTimer(setFrozen, 5000, 1) addEventHandler("onClientMarkerHit", setFrozen) and the client is busjob_c.lua some posts above and I didn't use a function but marker = createMarker to create one.
