-
Posts
244 -
Joined
-
Last visited
Everything posted by Price.
-
you can try using this setPlayerNametagColor ( thePlayer,r,g,b )
-
/debugscript 3 , anything? remove local from: local function spawnAllPlayers()
-
uhm yes you could afaik, but its more complicated better to do it from the main files.
-
why don't you just color the name when he shouts, why do you have to make a settings for it?
-
here this is the full code, about that window make it yourself as TAPL said Marker = createMarker (1811.0029296875, 1076.5595703125, 6.734375, "cylinder", 2.0, 0, 255,255) addEventHandler("onMarkerHit",Marker, function(thePlayer) if (getElementType(thePlayer) == 'player' ) then local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "L5" ) ) ) then local x,y,z = getElementPosition(thePlayer) x = x+10 createVehicle (411, 1811.0029296875, 1076.5595703125, 6.734375) end end end )
-
uhm what's the errors? and btw since when did "element" gets defined?
-
both, if you don't want to see settings at all and that "Hold RMB" bla bla bla then dxdraw and GUI button
-
try this Marker = createMarker (x, y, z, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",Marker, function(thePlayer) if (getElementType(thePlayer) == 'player' ) then local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Good" ) ) ) then createVehicle ( ID, x+10, y, z ) end end end ) Edited the code. Now if you are in gorup "good" you will be able to create a car beside you, if you want to get him into car use warpPedIntoVehicle
-
you will need to make a group that will be special in ACL and use: if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("GROUPNAME")) then
-
seems its not your code but here Team = "ahmed1010" local Object = createObject ( ID, x, y, z, rx, ry, rz ) local Marker = createMarker ( -11.482395172119, 2071.0393066406, 17.4921875, "cylinder", size, 0, 0, 0, 80 ) function OpenObject ( player ) if isElementWithinMarker ( player, Marker ) then if ( getTeamName( getPlayerTeam( player ) ) == Team ) then if not Open then moveObject ( Object, 1500, moveX, moveY, moveZ ) else moveObject ( Object, 1500, x, y, z ) end Open = not Open else outputChatBox ( "* You aren't in ["..Team.."] team !", player, 200, 0, 0, true ) end end end addEventHandler ( "onResourceStart", getRootElement(), OpenObject ) What do you mean by "correct" this code? you have to say what you want to be edited or whats your errors?
-
its from anothr topic just replace those coordinates. if AdminGate then destroyElement ( AdminGate ) end local AdminGate = createObject ( 971, -504.7998046875, 2592.599609375, 56.200000762939, 0, 0, 90 ) local state = 0 --this is the state, if 0 gate closed if 1 it's open function move() if state == 0 then --it's closed so open it moveObject ( AdminGate, 2500, -504.79998779297, 2592.6000976563, 62.099998474121) --Time means how fast the object'ill be moved. state = state + 1 elseif state == 1 then --it's open so close it moveObject ( AdminGate, 2500, -504.7998046875, 2592.599609375, 56.200000762939) state = state - 1 end end addCommandHandler("admin75", move )--this one creates a command "/gate" wich'll start the move function
-
uhm btw you need to use setElementPosition
-
addEventHandler("onClientGUIClick", root, function () local row2, col = guiGridListGetSelectedItem(grid) local select = guiGridListGetItemText(grid, row2, col) if (source == warp) then triggerServerEvent("warp", getLocalPlayer()) end end )
-
well this is weird getElementPosition(client) ? try this addEvent("warp", true) addEventHandler("warp", root, function () local x,y,z = getElementPosition(source) setElementPosition(source, x+1,y+1,z+1) end ) not sure.
-
check wiki examples and it's functions explanation and you will know what you need to do.
-
your code is a total mess here try castillo's code SERVER SIDED: function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("God Mode is now Disabled.",thePlayer,0,255,0) else setElementData(thePlayer,"invincible",true) outputChatBox("God Mode is now Enabled.",thePlayer,0,255,0) end end end addCommandHandler("godmode",toggleGodMode) CLIENT SIDED: addEventHandler ( "onClientPlayerDamage",root, function () if getElementData(source,"invincible") then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",localPlayer, function (targetPlayer) if getElementData(targetPlayer,"invincible") then cancelEvent() end end) this is Castillo's code.
-
check how it works, https://wiki.multitheftauto.com/wiki/OnPlayerJoin
-
uhm to add new score board use this function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","AddYourNewColoumnName") --Add it to scoreboard end )
-
afaik it looks good but i think it should be like this local id = tonumber ( id ) local car = getPedOccupiedVehicle ( thePlayer ) addVehicleUpgrade(car,1079) end addEventHandler("onResourceStart", getRootElement(), setPlayerWheel) addEventHandler("onMapStarting", getRootElement(), setPlayerWheel)
-
local tunaColor = tocolor(255, 0, 0, 255) function player () local join = getPlayerName ( source ) local text = source, "#FFFFFF" ..join.. " #0080FFis logged!" dxDrawText( text, 25,166.09, screenWidth, screenHeight, tocolor(0,0,0), 1.2, "default-bold","left") dxDrawText( text, 24,166.09, screenWidth, screenHeight, tocolor(0,128,255), 1.2, "default-bold","left") end addEventHandler ( "onPlayerLogin", getRootElement(), player ) tocolor wasn't defined, try now.
-
@ pa3ck sorry i just modified what biilly wanted, and i noticed that after i posted it @ biily idk if i there is a way to make it 270 degrees turned, about money try this rootElement = getRootElement() function money(source) outputChatBox(getPlayerName(source).." has logged in!", 5, 255, 0, 0, font) givePlayerMoney( source, 1000 ) end addEventHandler("onPlayerLogin", rootElement, money)
-
rootElement = getRootElement() function money() outputChatBox(getPlayerName(getElementRoot()).." has logged in!", getElementRoot()) givePlayerMoney( getElementRoot(), 1000 ) end addEventHandler("onPlayerLogin", rootElement, money)
-
well here is a little script i made to spawn because i removed play gamemode so this will make u spawn in a specific place ofc you can edit the coordinates you need. local spawnX, spawnY, spawnZ = 1942.16150, -1703.89636, 13.38281 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome Message", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler)