
qaisjp
Retired Staff-
Posts
2,344 -
Joined
-
Days Won
10
Everything posted by qaisjp
-
I would like to create a circular radar instead of a rectangular radar, is there any way to achieve this?
-
What are the formats supported in dxDrawImage and guiCreateImage Is there any possibility that SVG file format support could be added in 1.1?
-
does dxDrawImage support .svg images? Thnx in advance
-
A few ideas and stuff: i) I don't think you should use mysql ii) Instead of storing plaintext serial's md5() encode them. iii) Statuses (Appear Offline, Busy, Online etc.) iv) have something like a minimise button on the gui and when pressing it it shows a small button in the botttom right corner that opens directly to gui.
-
I know about that, I made a post on it and apparently it was a lost resource or seomthing like that
-
I look forward to a function like this! Perhaps also allow water integration? ?
-
Ah sorry, my mistake. I assumed it was a map not a script.
-
it is at line 1326, use notepad++ for easier viewing. Try deleting that line.
-
Sorry for the bump but keywords and passwords can be md5'ed using md5(string). So instead of if guiGetText(passwordEdit) == getElementData(me, "pass") then use if md5(guiGetText(passwordEdit) == getElementData(me, "pass") then
-
Try this function drawNameColor(str, ax, ay, bx, by, color, scale, font, alignx) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local w if s and e and cap and col then local last = 1 while s do if cap == "" and col then color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end if s ~= 1 or cap ~= "" then w = dxGetTextWidth(cap, scale, font) w = w*1.6 dxDrawText(cap, ax - w, ay, ax - w, by, color, scale, font, alignx) color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) dxDrawText(cap, ax + w, ay, ax, by + w, color, scale, font, alignx) end else dxDrawText(str, ax, ay, bx, by, color, scale, font, alignx) end end function init(element) -- trigger the drawNameColor end addEventHandler("onClientRender", root, function() for _, player in ipairs(getElementsByType("player")) do if player ~= getLocalPlayer() and isElementOnScreen(player) then init(player) end end end ) May i ask you what the following arguments: (str, ax, ay, bx, by, color, scale, font, alignx) is for? I need that so i can complete the code.
-
I helped him understand that variables are generally the other way round than he thought
-
Do you want to reset the number of kills each time you start the mission? Yes? !! function addKill(totalAmmo, killer) local account = getPlayerAccount(killer) local kills = getAccountData(account, "KillsOn10Peds") setAccountData(account, "KillsOn10Peds", 0) if kills ~= 10 then setAccountData(account, "KillsOn10Peds", tonumber(kills + 1)) elseif kills == 10 then outputChatBox(chat.."#ff0000Compliments! You completed the mission '#ffffffKilling <3#ff0000'#ff0000, you recieve 1 medal and 200$!", killer, 255,255,255, true) local cash = getAccountData(account, "cash") local medals = getAccountData(account, "cash") if not cash then setAccountData(account, "cash", 0) if not medals then setAccountData(account, "medals", 0) setAccountData(account, "medals", cash + 1) setAccountData(account, "cash", medals + 200) setScoresInBoard() stopMission(killer) end end addEventHandler("onPedWasted", getRootElement(), addKill) no problemo
-
well yay ;D Also is there a way to make all resources have a defined global variable that has [xxx] as value?
-
You mean = noob
-
A quick question. Is addEventHandler("onClientRender", root, check) the same as addEventHandler("onClientRender", getRootElement(), check) cos when use root as an argument i dont get any errors O_O what is root? is it the same as getRootElement()?
-
H5N1, it is fine now, I think i have got it done. I finished it before you posted, thanks for your help tho.
-
function addKill(totalAmmo, killer) local account = getPlayerAccount(killer) local kills = getAccountData(account, "KillsOn10Peds") if not kills then setAccountData(account, "KillsOn10Peds", 0) end if kills ~= 10 then setAccountData(account, "KillsOn10Peds", tonumber(kills + 1)) elseif kills == 10 then outputChatBox(chat.."#ff0000Compliments! You completed the mission '#ffffffKilling <3#ff0000'#ff0000, you recieve 1 medal and 200$!", killer, 255,255,255, true) local cash = getAccountData(account, "cash") local medals = getAccountData(account, "cash") if not cash then setAccountData(account, "cash", 0) if not medals then setAccountData(account, "medals", 0) setAccountData(account, "medals", cash + 1) setAccountData(account, "cash", medals + 200) setScoresInBoard() stopMission(killer) end end addEventHandler("onPedWasted", getRootElement(), addKill) no problemo
-
By the looks of it, you have been scammed
-
executeCommandHandler("reconnect") - - Give resource admin rights
-
Oh cool, so you move the object and set the camera matrix to the object location