#Paper
Members-
Posts
568 -
Joined
-
Last visited
Everything posted by #Paper
-
The table.string in bad argument function getPlayer(thePlayer) local players = {} for id, player in ipairs(getElementsByType("player")) do local playerName = getPlayerName(player) local playerName = playerName:gsub("#%x%x%x%x%x%x", "") table.insert(players, playerName) end if string.find(players, thePlayer) then return playerName else return false end end
-
The stats whit these functions are saved in registry.db (server path) and u can see it whit SQLLite Browser ;D
-
you can't see it in game or out the game?
-
Must you set stats for an account? Use setAccountData and getAccountData, not execute... it's more easy
-
Yes, it is EDIT: The 1° script doesn't work
-
The grid list is empty, just the column and the stats text are "Points: " as i maked it... the text doesn't modify
-
Why this doesn't work? (Don't show any error) ------------------Client Side function showHide() if guiGetVisible(GUIEditor_Window[1]) == false then showCursor(true) guiSetVisible(GUIEditor_Window[1], true) triggerServerEvent("onGetForPlanel", getLocalPlayer(), getLocalPlayer()) else showCursor(false) guiSetVisible(GUIEditor_Window[1], false) end end bindKey("F7", "down", showHide) ------------------Server Side addEvent("onGetForPlanel", true) function getForPanel(thePlayer) local theSerial = getPlayerSerial(thePlayer) local getRaceAtp = executeSQLSelect("system_racApt", "raceaptemps", "serial='"..theSerial.."'") local getRaceW = executeSQLSelect("system_racWin", "racewins", "serial='"..theSerial.."'") local getRaceL = executeSQLSelect("system_racLose", "racelose", "serial='"..theSerial.."'") triggerClientEvent("onSetText", thePlayer, getRaceW, getRaceL, getRaceAtp) end addEvent("onGetForPlanel", getRootElement(), getForPanel) ------------------Client Side addEvent("onSetText", true) function setText(theW, theL, theA) guiSetText(GUIEditor_Label[1], tonumber(theA)) guiSetText(GUIEditor_Label[2], tonumber(theW)) guiSetText(GUIEditor_Label[3], tonumber(theL)) guiSetText(GUIEditor_Label[6], tonumber(getElementData(getLocalPlayer(), "Points"))) guiSetText(GUIEditor_Label[7], tonumber(getElementData(getLocalPlayer(), "Money"))) guiSetText(GUIEditor_Label[8], tonumber(getElementData(getLocalPlayer(), "Skill Points"))) end addEventHandler("onSetText", getRootElement(), setText) And this other doesn't show any error: local skins = {0,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,30,31,32,33,34,35,36,37,38,39,40,41,43,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,62,63,64,65,66,67,68,69,70} for v,skin in ipairs(skins) do row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1], row, clm, tonumber(skin), false, false) end
-
Mhh, and how i can track it in each angle?
-
How i can make a script that make 4 line in the rectangle's sides made a whit createColRectangle function?
-
The image won't show, and in debugscript there isn't any error: function showImg (totalAmmo, killer, killerWeapon, bodypart, stealth ) if isElement ( killer ) and getElementType ( killer ) == "player" then killImg = guiCreateStaticImage(176,244,226,182,"images/killed.png",false) setTimer(function () local alpha = guiGetAlpha(killImg) guiSetAlpha(killImg, alpha - 0.1) end, 500, 6) end end addEventHandler("onPedWasted", getRootElement(), showImg)
-
you must make differents locals whit different names and different locations...
-
so make more lines whit other locations .-."
-
Can you fix it? function checkKills( ammo, thePlayer, weapon, bodypart ) local getKills = getElementData(thePlayer, "Kills") local getRank = getElementData(thePlayer, "Rank") local getRankNum = gettok ( getRank, 1, string.byte('Level ') ) if getKills % 500 == 0 then local rankToSet = getRankNum + 1 setElementData(thePlayer, "Rank", "Level "..tonumber(rankToSet)) end end addEventHandler("onPedWasted", getRootElement(), checkKills)
-
I tryed to make that: function checkKills() local players = getElementsByType ( "player" ) -- get a table of all the players in the server for theKey,thePlayer in ipairs(players) do -- use a generic for loop to step through each player local getKills = getElementData(thePlayer, "Kills") local getRank = getElementData(thePlayer, "Rank") local getRankNum = gettok ( getRank, 1, string.byte('Level ') ) if getKills % 500 == 0 then local rankToSet = getRankNum + 1 setElementData(thePlayer, "Rank", "Level "..tonumber(rankToSet)) end end end setTimer(checkKills, 100, -1) I need a thing like this... Errors: gettok = Bad Argument Line 7 = Can't do the operation...
