-
Posts
439 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Turbe$Z
-
- 8 replies
-
- community
- multitheftauto
-
(and 3 more)
Tagged with:
-
Google Chrome
- 8 replies
-
- community
- multitheftauto
-
(and 3 more)
Tagged with:
-
i want search a script on community, but the site does not load.:o why?
- 8 replies
-
- community
- multitheftauto
-
(and 3 more)
Tagged with:
-
i added DD maps, but doesn't working.. when i connect the server, show votemanager, i vote for example 7, and the map does not start.. Why? -.-
-
i have a radar script, with "showPlayerHudComponent("radar", false)" but the radar, when change map will show again, why? how to fix? Race gamemode!
-
i want download a dd killmessages which show [killername] [x2(doble kill)] skull icon [killedname] where can i download this??
- 3 replies
-
- killmessages
- script
- (and 8 more)
-
working with command, but with button, doesn't working, why? addEvent( "m4", true ) addEventHandler( "m4", root, function () local p_coins = exports.coinsystem:getPlayerCoin(player) if tonumber( p_coins ) >= 400 then giveWeapon(player, 31, 2000) exports.coinsystem:takePlayerCoin(player, 400) outputChatBox("you bought a M4.", player, 0, 255, 0, false) else outputChatBox("you don't have enough coins!", player, 255, 0, 0, false) end end ) i got this error: xy.lua:3: attempt to compare number with nil
-
function buyWeapon(thePlayer, command) local mycoins = exports.coinsystem:getPlayerCoin(thePlayer) if (mycoins >= 1) then giveWeapon(thePlayer, 31, 2000) exports.coinsystem:takePlayerCoin(thePlayer, prize) outputChatBox("you bought a M4.", thePlayer, 0, 255, 0, false) else outputChatBox("you don't have enough coins!", thePlayer, 255, 0, 0, false) end end addCommandHandler("buyw", buyWeapon) i got this error: xy.lua:17: attempt to compare number with nil
-
Lol, and when i join the game, the counter does not appear jut when i logged in, and got this warning @ Bad argument @ 'dxDrawText' [Expected string at argument 1, got nil] How to fix this? ..:s This is the client code: local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1024), (screenH/768) local size = y*1.50 function drawText() local playerCoins = getPlayerCoin(getLocalPlayer()); -- local gPlayerCoins = string.format("%08d", playerCoins); dxDrawRectangle(screenW * 0.6972, screenH * 0.0711, screenW * 0.1500, screenH * 0.0256, tocolor(0, 0, 0, 170), false) dxDrawText("Coin:", screenW * 0.7000, screenH * 0.0711, screenW * 0.7431, screenH * 0.0967, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText(playerCoins, screenW * 0.7431, screenH * 0.0711, screenW * 0.8472, screenH * 0.0967, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end addEventHandler("onClientRender", root, drawText) function getPlayerCoin() local data = getElementData(getLocalPlayer(), "moneycoins"); thePoints = tonumber(data); return thePoints end fileDelete("c_client.lua") And yeah, #WeAreTheVR
-
now working the script, save my coins, thanks but i got a warning: "Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean]" Why got this warning?
-
i added events, but doesn't working, why? function setAccountCoinValue(player,amount) if not player or not (isElement(player)) then return false end local account = getPlayerAccount(player) if isGuestAccount(account) then return false end setAccountData(account,"coins",amount) return true end function getAccountCoinValue(player) if not player or not (isElement(player)) then return false end local account = getPlayerAccount(player) if isGuestAccount(account) then return false end return getAccountData(account,"coins") or 0 end addEventHandler("onPlayerJoin",root,setAccountCoinValue) addEventHandler("onPlayerQuit",root,getAccountCoinValue) addEventHandler("onResourceStart",resourceRoot,setAccountCoinValue)
-
i downloaded this script https://community.multitheftauto.com/index.php?p=resources&s=details&id=10944 but this doesn't save the player coint to account, how to ad this function?