
Sendy
Members-
Posts
78 -
Joined
-
Last visited
Everything posted by Sendy
-
function writedata(query) local connection = exports.db:getConnection()--I have another script that exports the connection local result = dbPoll(query, 0) if (#result > 0 ) then local up = dbQuery(connection, "UPDATE players SET money = ? WHERE account = ? ", getPlayerMoney(source), account)--Update player money if found result dbFree(up) elseif (#result == 0 ) then local insert = dbQuery(connection, "INSERT INTO players (account, money) VALUES(?, ?) ", account, getPlayerMoney(source))--insert player money if found result end end
-
But how i Can detect if my ped is hit by water Can?
-
function outputPlayerHitByWater(thePed) --if (getElementType(thePed) ~= "player") then if (getElementType(thePed) == "ped") then --setElementHealth(thePed, getElementHealth(thePed) - 1) killPed ( thePed, attacker, 56, 9, false) end end addEventHandler("onClientPedHitByWaterCannon", getRootElement(), outputPlayerHitByWater) Can anyone tell me why this not working? i have always warning Bad ussage killPed this client side function will only work with client created peds
-
onPlayerLogin triggerClientEvent downloadFile
-
must work.. /debugscript 3 ?
-
addCommandHandler("easr", function() players = getElementsByType("player") for i,v in ipairs(players) do setElementPosition(v, posX, posY, posZ) end end)
-
7 years
-
function check ( player, seat, jacked ) if getElementData(source, "policeman") == true then if getElementData(source, "owner") == getAccountName(getPlayerAccount(player)) then else cancelEvent() outputChatBox("You need to be a Policeman", player) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), check ) function setcop(player, cmd) setElementData(getPedOccupiedVehicle(player), "policeman", true) setElementData(getPedOccupiedVehicle(player), "owner", getAccountName(getPlayerAccount(player))) outputChatBox("The Policeman:"..getPlayerName(player), player) end addEventHandler ( "onVehicleEnter", getRootElement(), setcop )
-
Post the code..
-
Code?
-
server-side -> setPlayerMoney() use triggerServerEvent() when you buy weapon
-
function boss3 ( ) NemesisLosSantos = exports [ "slothBot" ]:spawnBot ( 1182.7412109375, -2036.556640625, 69.0078125, 90, 110, 0, 0, nil, 34,"waiting", true ) exports.extra_health:setElementExtraHealth ( NemesisLosSantos, 7000 ) outputChatBox ("#1DF30BEvento: El #FC0303BOSS Sniper Zombie #1DF30Bha vuelto a la vida. Ciudad Los Santos", getRootElement(), 255, 255, 255, true ) outputChatBox ("#1DF30BEvento: Premio #FC0303$20.000 #1DF30BPara El Player Que Mate Al Boss!",getRootElement(), 255, 255, 255, true ) Blip = (createBlipAttachedTo ( NemesisLosSantos, 23 )) setElementData ( NemesisLosSantos, "bossls", true ) end boss3() addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == NemesisLosSantos) then givePlayerMoney(killer,20000) --- dinero al matarlo -- killerName = getPlayerName(killer) triggerClientEvent(killer,"onShowMoney2",killer) weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=125,g=0,b=0}," *[Sniper Zombie]"},getRootElement(),wr,wg,wb ) -- killmesagge -- outputChatBox ( getPlayerName( killer ) .. " #1DF30BHa matado el #FC0303Boss Sniper #1DF30BRecompensa de #FC0303$20.000",getRootElement(), 255, 255, 255, true ) destroyElement(Blip) setTimer(boss3, 25000, 1) end end)
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=2175
-
I need from .xml but thanks i find this from another resource but i don't know how this can work with my system function loadText (language, stringName, resource) if resource == nil then stringsFile = stringsRootFile else local resourceFile = getResourceFromName (resource) if resourceFile == false then return false end end language = getElementData(source, "Language") if stringName then stringsFile = xmlLoadFile (":" .. tostring(resource) .. "/en.xml") if stringsFile then local firstStringNode = xmlFindChild ( stringsFile, tostring(stringName), 0 ) if firstStringNode then local secondStringNode = xmlFindChild ( firstStringNode, tostring(language), 0 ) if secondStringNode then local text = xmlNodeGetValue (secondStringNode) if text then return tostring(text) else return false end else return false end else return false end else return false end else return false end end
-
Hello can anyone help me with this? i want create multi language but i don't know how. --en.xml <language name="EN"> <message string="EN" /> <message string="EN1" /> </language> i'am using if getElementData(source, "Language") == "EN" then outputChatBox("EN") else outputChatBox("EN1") end --for set language setElementData(source, "Language", "EN") How i can get text in outputChatBox from first code? please help
-
Thanks when i want add years, months, days? local years = math.floor((remaining_time % number) / number) local months = math.floor((remaining_time % number) / number) local days = math.floor((remaining_time % number) / number) local hours = math.floor((remaining_time % 86400) / 3600) local mins = math.floor((remaining_time % 3600) / 60) local secs = math.floor(remaining_time % 60)
-
Thanks but not work i have 1 health and 100 armor and when ped attack to me i'am dead.. when i have 2 and more health and armor 100 and peds attack to me its working loss
-
function armor(loss) local Health = getElementHealth(source) local Armour = getPedArmor(source) setPedArmor(source, Armour - loss) if Armour < 0 then setElementHealth(source, Health - loss) end end addEvent("ArMoR", true) addEventHandler("ArMoR", getRootElement(), armor) Please can anyone tell me why if i have armor 100 and health 1 and ped damage to me i'am dead? if i have health 100 and armor 100 its working first loos armor then health..
-
its setTimer(DeleteVIP, 60000, 0) sorry
-
What i don't need addCommandHandler..