Chaos
Members-
Posts
300 -
Joined
-
Last visited
Everything posted by Chaos
-
it's not working function createZombie ( x, y, z, rot, skin, interior, dimension ) if (table.getn( everyZombie ) < newZombieLimit ) then --this part handles the args if not x then return false end if not y then return false end if not z then return false end if not rot then rot = math.random (1,359) end if not skin then randomZskin = math.random ( 1, table.getn ( ZombiePedSkins ) ) skin = ZombiePedSkins[randomZskin] end if not interior then interior = 0 end if not dimension then dimension = 0 end --this part spawns the ped local zomb = createPed (tonumber(skin),tonumber(x),tonumber(y),tonumber(z))--spawns the ped if isElementInWater ( zomb ) then outputChatBox("it's Working",root) destroyElement( zomb ) end --if successful, this part applies the zombie settings/args if (zomb ~= false) then setTimer ( setElementInterior, 100, 1, zomb, tonumber(interior)) --sets interior setTimer ( setElementDimension, 100, 1, zomb, tonumber(dimension)) --sets dimension setElementData ( zomb, "zombie", true ) setElementData ( zomb, "forcedtoexist", true ) setTimer ( function (zomb, rot) if ( isElement ( zomb ) ) then setPedRotation ( zomb, rot ) end end, 500, 1, zomb, rot ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setElementData ( zomb, "status", "idle" ) end end, 2000, 1, zomb ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setElementData ( zomb, "forcedtoexist", true ) end end, 1000, 1, zomb ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then table.insert( everyZombie, zomb ) end end, 1000, 1, zomb ) triggerClientEvent ( "Zomb_STFU", getRootElement(), zomb ) return zomb --returns the zombie element else return false --returns false if there was a problem end else return false --returns false if there was a problem end end
-
there is no createPed function you mean here ? --EXPORTED FUNCTIONS!!!!!!!!!!!!!! function createZombie ( x, y, z, rot, skin, interior, dimension ) if (table.getn( everyZombie ) < newZombieLimit ) then --this part handles the args if not x then return false end if not y then return false end if not z then return false end if not rot then rot = math.random (1,359) end if not skin then randomZskin = math.random ( 1, table.getn ( ZombiePedSkins ) ) skin = ZombiePedSkins[randomZskin] end if not interior then interior = 0 end if not dimension then dimension = 0 end --this part spawns the ped local zomb = createPed (tonumber(skin),tonumber(x),tonumber(y),tonumber(z))--spawns the ped --if successful, this part applies the zombie settings/args if (zomb ~= false) then setTimer ( setElementInterior, 100, 1, zomb, tonumber(interior)) --sets interior setTimer ( setElementDimension, 100, 1, zomb, tonumber(dimension)) --sets dimension setElementData ( zomb, "zombie", true ) setElementData ( zomb, "forcedtoexist", true ) setTimer ( function (zomb, rot) if ( isElement ( zomb ) ) then setPedRotation ( zomb, rot ) end end, 500, 1, zomb, rot ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setElementData ( zomb, "status", "idle" ) end end, 2000, 1, zomb ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setElementData ( zomb, "forcedtoexist", true ) end end, 1000, 1, zomb ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then table.insert( everyZombie, zomb ) end end, 1000, 1, zomb ) triggerClientEvent ( "Zomb_STFU", getRootElement(), zomb ) return zomb --returns the zombie element else return false --returns false if there was a problem end else return false --returns false if there was a problem end end
-
hey guys, i want to prevent zombies keep spawning in the water it's really annoying and most of zombies are spawning in water. I'm using default zombies script.. any idea ?
-
But how castillo did it with gang system with out these functions
-
Thank you but i don think table will save teams when i restart resource
-
i need simple example table for this part function createTm(player, commandName, teamName) local acc = getPlayerAccount(player) if isGuestAccount ( acc ) then outputChatBox("You must login first !",player,255,0,0) end if getAccountData(acc,"histeam") then outputChatBox("You already have team !",player,255,0,0) end if not teamName then outputChatBox("Please Write valid name usage /ct teamname !",player,255,0,0) end if acc and not isGuestAccount ( acc ) and not getAccountData(acc,"histeam") and teamName then Team = createTeam(teamName) if Team then outputChatBox("Team created successfully !",player,0,255,0) setAccountData(acc,"histeam",getTeamName ( Team )) setPlayerTeam(player,Team) else outputChatBox("Failed to create team !",player,255,0,0) end end end addCommandHandler("ct",createTm)
-
I want easy way than using mysql and sqlite because i never worked on these functions Before
-
It worked thanks but i got another problem when player created team and when he quit other players can create same team name and by the way i used setaccountdata and getaccountdata to save team on account. is there a way to fix that ?
-
hey, i'm creating team system but i'm wondering how can i make invite command like when i invite player then he will got you have been invite to gang type /agree to join and when he typed agree will got output you joined function invite( player, cmd, target) local target = getPlayerFromNamePart ( target ) if target then outputChatBox("you have invited to red team type /agree to join !",target) end end function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end
-
You have to edit freeroam and remove onPlayerChat Event in fr_server.
-
I know meant this way more simple than edit acl.
-
Yep, just copy internal.db and replace it.
-
Mate there is no need to restart server.
-
Make sure you have already added it in admin group.
-
Anything in debug?
-
hey, i'm trying to set dx Rectangle for all screen resolution and this script it's working perfect in the corner but when i change the positions 84 and 48 (trying to move it) won't be set for all all screen resolution any help ? sWidth, sHeight = guiGetScreenSize() -- Getting the screen size function draw() dxDrawRectangle(sWidth-84,sHeight-48,78.0,33.0,tocolor(0,0,0,150),false) end addEventHandler("onClientRender", root, draw)
-
yeah it worked thanks again.
-
but it keeps appear only for me
-
thanks a lot so should be ? triggerClientEvent(source,"showStatus",root,name,accountName)
-
hey, so the question is why when others logged in it's won't appear his login log in memo and only show my login log ? server side : function showStatus () name = getPlayerName(source) account = getPlayerAccount(source) accountName = getAccountName (account) triggerClientEvent(source,"showStatus",source,name,accountName) end addEventHandler ("onPlayerLogin", getRootElement(), showStatus) Client side: GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(194, 118, 349, 331, "Info Panel", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) memo = guiCreateMemo(10, 22, 328, 261, "", false, wnd) end ) function otworz () if ( guiGetVisible ( wnd )) == false then guiSetVisible ( wnd, true ) showCursor ( true ) else guiSetVisible ( wnd, false ) showCursor ( false ) end end addCommandHandler("showlog",otworz) function changer (name,accountName) local gText = guiGetText(memo) if (gText ~= false) then guiSetText(memo,"\n"..name.." has logged in as "..accountName) end end addEvent ( "showStatus", true ) addEventHandler ( "showStatus", getRootElement(), changer )
-
As far i know in internal.db
-
it's working perfect thanks a lot Castillo.
