-
Posts
1,411 -
Joined
-
Last visited
-
Days Won
2
Everything posted by WASSIm.
-
hi guys i have problem i hope someone help me, so i make new event on player chat and he problem if anyone put command on chat its don't work addEvent("onPlayerChatRoom", true) addEventHandler("onPlayerChatRoom", root, function (message, type) if (string.sub(message, 1, 1) == "/") then local argcmd = split(message, " ") local command = tostring(argcmd[1]:gsub("/", "", 1)) table.remove(argcmd, 1) executeCommandHandler(command, source, unpack(argcmd))) end end)
-
see that tis exmple how remove texture of vehicle from EngineApplyShaderToModel myShader = dxCreateShader( "hello.fx" ) addEventHandler("onClientVehicleEnter", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer then engineApplyShaderToWorldTexture( myShader, "vehiclegrunge256", theVehicle ) engineApplyShaderToWorldTexture( myShader, "?emap*", theVehicle ) end end ) addEventHandler("onClientVehicleExit", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer then engineRemoveShaderFromWorldTexture( myShader, "vehiclegrunge256", theVehicle ) engineRemoveShaderFromWorldTexture( myShader, "?emap*", theVehicle ) end end )
-
tell us what chat put function on4XRegister ( player, user, pass, email ) local account = getAccount ( user, pass ) if ( account ) then if (logIn ( player, account, pass )) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else local account = addAccount ( user, pass ) if ( account ) then if ( email ) and ( setAccountData ( account, "email", email)) then setAccountData ( account, "email", email) if (logIn ( player, account, pass )) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Email error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Register error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "on4XRegister", true ) addEventHandler( "on4XRegister", getRootElement(), on4XRegister )
-
this best way to save money, anyway read this to know more about Account function savePlayersMoney( ) if (getElementType(source) == "player") then players = {source} else players = getElementsByType("player") end for _, player in ipairs(players) do local account = getPlayerAccount(player) if (account) and not (isGuestAccount(account)) then local money = getPlayerMoney (player) setAccountData(account, "Money", money) end end end addEventHandler ("onResourceStop", resourceRoot, savePlayersMoney) addEventHandler ("onPlayerQuit", root, savePlayersMoney) addEventHandler ("onPlayerLogout", root, savePlayersMoney) function loadPlayersMoney( ) if (getElementType(source) == "player") then players = {source} else players = getElementsByType("player") end for _, player in ipairs(players) do local account = getPlayerAccount(player) if (account) and not (isGuestAccount(account)) then local money = getAccountData(account, "Money") or 0 setPlayerMoney(player, tonumber(money)) end end end addEventHandler ("onResourceStart", resourceRoot, savePlayersMoney) addEventHandler ("onPlayerLogin", root, savePlayersMoney)
-
bcs there spamm change element data
-
triggerClientEvent ??
-
posy your code here
-
you looks talking like you paid for fix script
-
can you show us full code ?
-
--Create teams on resource start function createTeams( ) --function staff = createTeam("Admin", 128, 0, 0) --create team end addEventHandler("onResourceStart", getRootElement(), createTeams) --Set admins from ACL to Admin team after logging in function setAdminTeam(_, account) --function if isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("Admin")) then --check if admin setPlayerTeam(source, staff) --set team outputChatBox("Greetings "..getPlayerName(source).." !", root, 0, 255, 0, true) end end addEventHandler("onPlayerLogin", getRootElement(), setAdminTeam)
-
WTF guys addEventHandler("onResourceStart", resourceRoot, function() for _, player in ipairs(getElementsByType("player")) do setPlayerNametagShowing(player, false) end end ) addEventHandler("onPlayerJoin", root, function() setPlayerNametagShowing(source, false) end )
-
you need use triggerServerEvent and triggerClientEvent
-
you need: onClientVehicleExplode and.. addEventHandler getCameraMatrix or getElementPosition createExplosion
-
do you quit or logout on testing script ??
-
local antiSpamAds = { } -- Check time function timerDetails(source) if (isTimer(antiSpamAds[source])) then local remaining = getTimerDetails(antiSpamAds[source]) outputChatBox("Time remaining "..remaining.." seconds .",source,153,51,255) else outputChatBox("Timer no longer exists",source,153,51,255) end end addCommandHandler("time", timerDetails) -- Save time function save(_, PlayerAccount ) if (isTimer(antiSpamAds[source])) then local remaining = getTimerDetails(antiSpamAds[source]) setAccountData(playeraccount, "time", remaining ) killTimer(antiSpamAds[source]) antiSpamAds[source] = nil end end addEventHandler("onPlayerLogout", root, save ) -- Load time function load(_, PlayerAccount ) local time = getAccountData(playeraccount, "time") if (time) then antiSpamAds[source] = setTimer(function() end, tonumber(time), 1) end end addEventHandler("onPlayerLogin", root, load)
-
you can check memory client scripts and files only from server side its same memory on client side
-
hi guys, need help for make setting shader, so i make setting system and i have setting panel... so i want add shaders setting in panel and i get it but some shaders don't work 100% bcs create many screens with dxCreateScreenSource i use export but don't work, so i need merge them in same resource but i will get some problems so i have idea to use loadstring for loading scripts shader but i don't know how unload them, please anyone have idea ? Sry for bad english
-
so do you have any idea how make my VPS protected ?
-
ATTACK THIS , LEAKED SCRIPT
WASSIm. replied to roddydennvor's topic in Site/Forum/Discord/Mantis/Wiki related
we can't do anthing -
local x, y, z = 1516.41675, -1847.13733, 13.54688 local lixo1 = createMarker(x, y, z, 'cylinder', 2.0, 255, 0, 0, 150) function aLixeiro (source) if getPlayerTeam (source, Lixeiros) then outputChatBox("Você pegou o lixo na casa!", source, 255, 0, 0) givePlayerMoney ( source, 50 ) destroyElement(lixo1) setTimer(function() lixo1 = createMarker(x, y, z, 'cylinder', 2.0, 255, 0, 0, 150) end, 2000, 1) else outputChatBox("Você não é lixeiro!", source, 255, 0, 0) end end addEventHandler( "onMarkerHit", lixo1, aLixeiro )