-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
I just answered him that he defined the team name in a variable named 'teamName' and he didn't use it at all
-
The variable 'teamName' is being useless
-
The variable 'teamName' is being useless
-
Deepu, you're totally wrong, "(getPed/setPed)ControlState works only with the peds not with local player since it's client sided
-
Deepu, you're totally wrong, "(getPed/setPed)ControlState works only with the peds not with local player since it's client sided
-
Can't you search by yourself first ? https://community.multitheftauto.com/
-
Why you looping players and you don't use the values at all @Jaber, you want the gui to be showen on the player join the server?
-
lol I tought I had added the 'not' before the function, thanks for your attention ! updated the deleteSpeaker function function deleteSpeaker(thePlayer) if not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then outputChatBox("You're not admin",thePlayer,255,0,0) return end if (isElement(speakerObject)) then destroyElement(speakerObject) outputChatBox("You have Succesfully destroyed the Speaker!", thePlayer, 0, 0, 255) triggerClientEvent("stopTheSound", root) else outputChatBox("Speaker is not created!", thePlayer, 250, 0, 0) end end addCommandHandler("destroyspeaker", deleteSpeaker)
-
function createSpeaker(thePlayer) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then outputChatBox("You're not admin",thePlayer,255,0,0) return end local x, y, z = getElementPosition(thePlayer) speakerObject = createObject(2229, x, y, z-1) outputChatBox("You have Succesfully created a speaker!", thePlayer, 0, 250, 0) if (isPedInVehicle(thePlayer)) then local vehicle = getPedOccupiedVehicle(thePlayer) attachElements(speakerObject, vehicle) triggerClientEvent(root, "playTheSound", root, x, y, z, vehicle) else triggerClientEvent(root, "playTheSound", root, x, y, z) end end addCommandHandler("placespeaker", createSpeaker) function deleteSpeaker(thePlayer) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then outputChatBox("You're not admin",thePlayer,255,0,0) return end if (isElement(speakerObject)) then destroyElement(speakerObject) outputChatBox("You have Succesfully destroyed the Speaker!", thePlayer, 0, 0, 255) triggerClientEvent("stopTheSound", root) else outputChatBox("Speaker is not created!", thePlayer, 250, 0, 0) end end addCommandHandler("destroyspeaker", deleteSpeaker)
-
I didn't test it, can you debug the code?
-
Try this @Root: addEventHandler ( "onClientKey", getRootElement(), function (button, press) if (button == "w") then setElementData (getLocalPlayer(), "w", press) else return false end if (button == "space" and press) then if (getElementData (getLocalPlayer(), "w")) then cancelEvent() --cancel the event end end end)
-
Yeah man I know that, but I can't even think I am too sleepy..
-
client side: bindKey( "w", "down", function () if (getKeyState("space") == true) then cancelEvent () end end)
-
Try this, addEventHandler("onClientKey", root, function ( key, press ) if (key == "w") then if (getKeyState("space")) then cancelEvent() end end end)
-
unbindKey As far as I know, cancelEvent is used for events not for functions and "bindKey" is a function not an event
-
local q = dbQuery(con, "SELECT * FROM t_ayuntamiento WHERE Cuenta=?",Cuenta) local result = dbPoll(q,-1) local data = result[1] --Define result[1] with data instead of repeating it everytime needed. outputChatBox (data.Cocodrilo.. "is into db")
-
Oboviously dbPoll is a table, you have to loop it to get the specify value
-
Ah ana maghribi
-
fikra momtaza
-
You have to pay the scripter
-
Or, try my code: local model = nil function removingModels() if not model == 10324 or model == 10329 or model == 10330 or model == 10331 or model == 10332 or model == 10715 or model == 10719 then for i=550,20000 do model = i removeWorldModel(i,10000,0,0,0) end end end removingModels() setOcclusionsEnabled(false) Note: I didn't see your last post @CodyL
-
Codly's way is good but be sure the variable 'worldmodel' must be defined else the code won't work These objects are models so you have to define worldmodel with the function: getElementModel But, be sure this function require one argument
-
You can not update the table if its empty
-
I will be glad to help, Btw, What do you mean by 'blood'? to make the player's health down when the timer become less than or equal to 0 ?
-
Your current code is messy and not clear enough, if you want tomorrow I can make this code working for you, now I have to sleep
