-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
-- if you remove this line with "local" keyword, these -- functions will be visible to other files in the resource. -- Currently, you can only use them within this file only. local isPlayerInGroup, giveCash local function giveCashCommand (player) if isPlayerInGroup (player, "VIP") then giveCash (player) else outputChatBox ("You are not in the VIP group", player) end end addCommandHandler("givemecash", giveCashCommand) function giveCash (player) givePlayerMoney(player,99999999) outputChatBox ("$---------------------------------------------------------------------------------------------$",root,0, 255, 0,true) outputChatBox ("The player'"..getPlayerName(player).."' is extremely rich now because he ",root,250, 255, 0,true) outputChatBox (" Has received 99m$ ", root,0, 255, 221,true) outputChatBox ("$---------------------------------------------------------------------------------------------$",root,0, 255, 0,true) end function isPlayerInGroup (thePlayer, group) local playerAccount = getPlayerAccount ( thePlayer ) if playerAccount then local accName = getAccountName ( playerAccount ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( group ) ) then -- the player is in the group, return true return true end end -- the player is not in the group, return false return false end
-
Those are in vip i think
-
I didn't say you are stupid i said to you look at ped category because there is run and walk anims but if you think i am insult you then idk
-
https://wiki.multitheftauto.com/wiki/Animations Check ped category
-
you need take username not player name but for the dialog idk
-
Try yourself
-
-------------------- -- Author: IIYAMA -- -------------------- local renderEvents = { "onClientRender", "onClientPreRender", "onClientHUDRender" } local allTargetFunctions = {} -- All attached functions will be stored in this table. local acceptedRenderEventTypes = {} -- Is type in use? See: renderEvents. local renderEventTypeStatus = {} -- Is the event in use? (so it doesn't have to be attached again) do -- prepare the data for i=1, #renderEvents do local event = renderEvents[i] allTargetFunctions[event] = {} acceptedRenderEventTypes[event] = true renderEventTypeStatus[event] = false end end -- render all events here local processTargetFunction = function (timeSlice) local targetFunctions = allTargetFunctions[eventName] for i=#targetFunctions, 1, -1 do local targetFunctionData = targetFunctions[i] local arguments = targetFunctionData[2] if not arguments then targetFunctionData[1](timeSlice) else if timeSlice then targetFunctionData[1](timeSlice, unpack(arguments)) else targetFunctionData[1](unpack(arguments)) end end end end -- check if a function is already attached local checkIfFunctionIsTargetted = function (theFunction, event) if not event or not acceptedRenderEventTypes[event] then event = "onClientRender" end local targetFunctions = allTargetFunctions[event] for i=1, #targetFunctions do if targetFunctions[i][1] == theFunction then return true end end return false end -- add render event, default type is onClientRender function addRenderEvent(theFunction, event, ...) if not event or not acceptedRenderEventTypes[event] then event = "onClientRender" end if not checkIfFunctionIsTargetted(theFunction) then local targetFunctions = allTargetFunctions[event] targetFunctions[#targetFunctions + 1] = {theFunction, {...}} -- attach an event if not renderEventTypeStatus[event] then addEventHandler (event, root, processTargetFunction, false, "high") renderEventTypeStatus[event] = true end return true end return false end -- remove a render event function removeRenderEvent(theFunction, event) if not event or not acceptedRenderEventTypes[event] then event = "onClientRender" end local targetFunctions = allTargetFunctions[event] for i=1, #targetFunctions do if targetFunctions[i][1] == theFunction then table.remove(targetFunctions, i) if #targetFunctions == 0 then if renderEventTypeStatus[event] then removeEventHandler (event, root, processTargetFunction) renderEventTypeStatus[event] = false end end return true end end return false end Make sure copy that code to your script
-
function renderCountDown (text) dxDrawText("1", (screenW * 0.1596) + 1, (screenH * 0.2839) + 1, (screenW * 0.8404) + 1, (screenH * 0.4297) + 1, tocolor(0, 0, 0, 255), 4.00, "bankgothic", "center", "top", false, false, false, false, false) dxDrawText("1", screenW * 0.1596, screenH * 0.2839, screenW * 0.8404, screenH * 0.4297, tocolor(255, 255, 255, 255), 4.00, "bankgothic", "center", "top", false, false, false, false, false) end setTimer (function() addRenderEvent(renderCountDown, "onClientRender") end, 1000, 1 ) setTimer ( function() removeRenderEvent(renderCountDown, "onClientRender") end, 3000, 1 )
-
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10 function joinHan() fadeCamera(source, true) showCursor(source, true) triggerClientEvent(source , "pJoin", source ) spawnPlayer(source, spawnX, spawnY, spawnZ) end addEventHandler("onPlayerJoin", getRootElement(), joinHan) function trig() for _, v in ipairs(getElementsByType("player")) do triggerClientEvent(v, "pCreate", v) end end addEventHandler("onResourceStart", getRootElement(), trig)
-
GUIEditor = { label = {} } function create() login = guiCreateWindow(0.34, 0.23, 0.40, 0.30, "Unesite vasu lozinku da biste nastavili", true) guiWindowSetSizable(login, false) pw1 = guiCreateEdit(111, 136, 176, 17, "", false, login) guiSetProperty(pw1, "MaskText", "True") guiEditSetMasked(pw1, true) pw = guiCreateButton(108, 195, 43, 15, "Nastavi", false, login) pw2 = guiCreateButton(244, 195, 43, 15, "Izlaz", false, login) GUIEditor.label[1] = guiCreateLabel(412, 245, 318, 39, "Unesite vasu lozinku da biste nastavili registraciju", false) guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true) end ) addEvent("pCreate", true) addEventHandler("pCreate", create) addEvent("pJoin", true) addEventHandler("pJoin", root, function() create() guiSetVisible(login, true) guiSetVisible(pw1, true) guiSetVisible(pw2, true) guiSetVisible(pw, true) guiSetVisible(GUIEditor.label[1], true) otputConsole("Pjoin pozvan") end ) function ClickLeftBut(button, state) if(button == "left" and state == "up") then if(guiGetText(pw1) == nil or guiGetText(pw1) == '') then outputChatBox("Niste uneli pw", 231, 217, 176, false) else setCameraTarget(getLocalPlayer()) outputChatBox("Welcome to My Server", getLocalPlayer()) end end end addEventHandler("onPlayerGUIClick", ClickLeftBut) function ClickRightBut(button, state) if(button == "left" and state == "up") then guiSetVisible(login, false) guiSetVisible(pw1, false) guiSetVisible(pw2, false) guiSetVisible(pw, false) guiSetVisible(GUIEditor.label[1], false) end end addEventHandler("onPlayerGUIClick", ClickLeftBut) Try this kickPlayer and spawnPlayer is server side not client
-
function respawnPlayer() fadeCamera(source,false,1.0,0,0,0) setTimer(fadeCamera,2000,1,source,true,1.0,0,0,0) setCameraTarget(source,source) showChat(source,true) showPlayerHudComponent(source,"radar",true) showPlayerHudComponent(source,"area_name",true) spawnPlayer(source,1224.029296875, -1814.9765625, 16.59375,0 , getPedSkin(source), 0, 0) end addEventHandler("onPlayerWasted", getRootElement(), respawnPlayer) change first 0 with your rotation second and third is interior and dimension
-
Show us your code
-
You can't give ak and m4 only one of them giveWeapon getAccountName getPlayerAccount isObjectInACLGroup aclGetGroup addCommandHandler
-
The problem is in triggerServerEvent change getLocalPlayer() to root or resourceRoot
-
You don't have account in game only in database so you need have this in you login panel and put it in acl admin group getAccount addAccount
-
That the problem you need a account in game with /register and after create it /login
-
You have account name Helish?
-
Make sure it on acl at deathmatch folder please post here the acl admin group
-
Are you sure that you have put a user under the admin Group in acl
-
You must have account with that name you put in acl and login with it
-
getElementDimension setTimer kickPlayer
-
Try put download to false in meta