
bandi94
Members-
Posts
1,037 -
Joined
-
Last visited
Everything posted by bandi94
-
are some lua complier's but are some deompliers to they miss up some function's but the rest is ok
-
use addEventHandler ( "onVehicleStartEnter", getRootElement(), copenterVehicle ) and guiCreateWindow guiCreateLabel guiCreateButton guiSetVisible showCursor "onClientGUIClick"
-
you need to edit the scoreboard gui size i think but don't ask me where bk i have no idea
-
try now sorry i forgot to delete the old function end
-
copVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[599]=true } copTeam= { ["TeamName"]=true } function copenterVehicle ( player, seat, jacked ) local team = getPlayerTeam(player) if ( copVehicles[getElementModel ( source )] ) and ( not copTeam[getTeamName ( team )] ) and ( seat == 0 ) then removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You aren't a Police Officer , you mayn't drive this.", player ) --and tell the player why end end addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle ) not tested but sould work
-
test whit that code copy past again bk i forgot the getAcountName
-
this is not right local names ={"FWC Admin"} local tags ={"%FWC%"} local colors ={#fffafa} here test it whit this local names ={"FWC Admin"} local tags ={"%FW%C"} --- % need to be first and last by one local colors ={"#fffafa"} -- color code need to be in "" BT (i am Puma ) you try to check ACl right's for a team if i am right Try this not tested but sould work ---------Made by |DGT|Puma-------------- ---------------do not change or touch this---------- Names={} Tags={} Colors={} ACL={} -------------------------------------------------------------- ---------------------------here put your clans read readme for instructions--------------------------------------- local names ={"FWC Admin"} local tags ={"%FWC%>"} local colors ={"#fffafa"} local acls={"Admin"} --- put the acl name if you wanna check ACL group or "none" if you don't wanna check -------- load------------ function loadTeams() for i,name in pairs(names) do Names[i]=name end for i,tag in pairs(tags) do Tags[i]=tag end for i,color in pairs(colors) do Colors[i] = color end for i,acl in pairs(acls) do ACL[i] = acl end end addEventHandler("onResourceStart",root,loadTeams) --------------------------------------------------- ----- move on start------------------ function moveOnStart() for i,player in pairs(getElementsByType("player")) do check(player) end end addEventHandler("onResourceStart",root,moveOnStart) ------------------------------------------------------------------------- -----------check---------------------------- function check (player) setPlayerTeam(player,nil) for i,tag in pairs(tags) do if string.find(getPlayerName(player),tag) then local account=getPlayerAccount(player) if ACL[i]~="none" and not isObjectInACLGroup ( "user." ..getAccountName(account) , aclGetGroup ( ACL[i] ) ) then return end local name = Names[i] local color = Colors[i] if not getTeamFromName(name) then createTeam(name,getColorFromString(color)) end local team = getTeamFromName(name) setPlayerTeam(player,team) end end end -------------------------------- ----------remove Empty Team ---------- function remove() for t,teams in pairs(names) do local team = getTeamFromName(teams) if team then if countPlayersInTeam ( team )==0 then destroyElement(team) end end end end ----------------------------------------------------- -------NickChange------------- function nick(old,new) setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerChangeNick",root,nick) --------------------------------------------- -------Join-------------------------------- function join() setTimer(check,4000,1,source) end addEventHandler("onPlayerJoin",root,join) ------------------------------- ---------Quit--------------------- function quit(player) setTimer(remove,1000,1) end addEventHandler("onPlayerQuit",root,quit) ------------------------------------
-
function welcome() for i,player in pairs(getElementsByType("player")) do local name = getPlayerName(player) outputChatBox("Welcome"..name,player) end end addCommandHandler("welcome",welcome) next time try to use wiki and make a par of code
-
use local guiSkinShop = guiCreateWindow(284,179,245,307,"Skin Shop",false) local guiSetAlpha(guiSkinShop,1) local guiSkinShopGridlist = guiCreateGridList(10,29,223,234,false,guiSkinShop) local guiGridListSetSelectionMode(guiSkinShopGridlist,2) local column = guiGridListAddColumn (guiSkinShopGridlist,"Skins",0.2) local guiSkinShopBuy = guiCreateButton(11,270,68,27,"Buy ($200)",false,guiSkinShop) local guiSkinShopClose = guiCreateButton(164,270,68,27,"Close",false,guiSkinShop) function list() local skins={ "1","2".........} for i,list in pairs(skins) do local row= guiGridListAddRow ( guiSkinShopGridlist ) guiGridListSetItemText ( guiSkinShopGridlist, row, column, skins[i], false, false) end end addEventHandler("onClientResourceStart",getRootElement(),list) this add the skins to the list now on button pres get the selected item text (text=id) and then set the player skin
-
yes i find it its " triggerServerEvent ( "aMessage", getLocalPlayer(), "new", tableOut ) " now some test and a new gui and i think its done thx
-
its that funtion /report to send a message for admin's and they can read it in admin panel now somebody know in what file(.lua) is that function i wanna make a Gui to send messages but for ask something else and... i need to know what function need to be called and the message format to send a message thx
-
bk i think you added the server side onResource start but the client event only then start downlaoding when oyu restarted it you got no error bk you client side it was downloaded or try to add a timer on server side after the resource start or trigger the server from client when its downlaoded and then from the server again the client
-
MOJRM-511 if you steal my code and uploadit to somewhere i will .... Removed thx for all
-
i create a gui for radio chanels when you press r it show/hide and has a grid list and in it radio chanel names when you double click on a name the radio chanel start it has a volume bar and on/off buton (i use race gamemod) all good work fine until the next map start when the next map start when you press r it show up but i can't click on on/off buton if i double click on a radio chanel name it don't change volume bar again don't change the volum .. is't 100% client side all in 1 LUA it's a 1.1 bug or script bug or who knows what pls help ?
-
its not problem whit chek its problem to get the Team Data but i say a time and i say again i du it whit another database and working fine you can dowload it from comunity here is the link and pls close this topic https://community.multitheftauto.com/ind ... ls&id=2833
-
its true that i don't use many times TXD replace but i think that is not possible to replace only for some car's
-
solved my mistake i don't noticed that my GridList was behind the window whit guiBringToFront i solved the problem
-
i start make a gui i make a gui window a GridList and added some rows and my problem is if i set element parent for GridList i can't select the rows,items if i don't set the element parent then i am able to select rows,item is a way to be able to select items/rows and set the element parent ? thx
-
Cadu12 not working in that way but solved i make in a difrent database and its working i upload it to comunity
-
yes i think your problem was on saving team onPlayerQuit for my autoteam i use onPlayerQuit getTeam to check the player's in that team to delet team or not and it returns BadArgument getPlayerTeam
-
funtion setTeam(player) local account = getPlayerAccount(player) local team = getAccountData (account, "team") if (team) then setPlayerTeam(player, team) end end addEventHandler("onPlayerJoin",root,setTeam) function save(player) local team = getPlayerTeam(player) if (team) then setAccountData(account, "team", team) end end addCommandHandler("saveteam",save)