Fist
Members-
Posts
433 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Fist
-
yep now no errors, but still it doesnt work what i wanted to. It doesnt update player list at all, i never used string.find before, maybe could you help me with that?
-
its wroten in topic, error is that he gets userdata or boolen, even tough i convert oldNick and newNick to string or to playerName anyway here is image its 3th line in client side script.
-
Hello! How i could find player name in gridlist when he changes name and update's it with the new name in gridlist? i tried this but didnt work, it gave me errors that he gets boolen or user data i tried to use tostring() also getPlayerName(), didnt work either. client code: function updatePlayerList(oldNick,newNick) if string.find(oldNick,gridlistPlayers1) then guiGridListSetItemText(gridlistPlayers1, 0, string.find(oldNick,gridlistPlayers1), newNick, false, false) end end addEvent("updatePlayerList",true) addEventHandler("updatePlayerList",root,updatePlayerList) server code: function updatePlayerListOnNickChange(oldNick,newNick) triggerClientEvent(source,"updatePlayerList",source,oldNick,newNick) end addEventHandler("onPlayerChangeNick",root,updatePlayerListOnNickChange)
-
Hello! Is there a way to change player movements? Like to much better way, i have played few servers (They were DayZ) and on those servers, player movements were so great, like it feels so much better to play with those movements than to play with default.
-
but they are in seprate files theese 2 server side scripts? If so you havent included them in meta.xml file. Or just give full code.
-
Theese 2 scripts are both on server side?
-
Hello! I tried to disable 1 tab from tab gui with this code guiSetProperty(tab, "Disabled", "True") It didnt work i dont know why. Here is image http://prntscr.com/aklnpv i want to disable tab2 but so tab1 and tab3 would be still available, i saw this on admin panel but seems that i cant do that. Thanks for help.
-
yea but you really want to disable every bind that u had by every unbindKey? and that one code what i wrote it dont quite work actually. This one will fix this problem. guiSetInputMode("no_binds_when_editing") guiSetInputMode("allow_binds")
-
nevermind guys, i just found way to do it. here is code guiSetProperty(kwEditBoxReason, "DistributeCapturedInputs", "True")
-
Hello! I wonder is there a way when you type something in editbox and it wont effect any other things when u press keys except typing in editbox like if you select editbox and type P (in my case P is admin panel) it opens Admin Panel while i was typing words in editbox. Sorry for my english if you couldnt understand what i was meaning.
-
why u made other topic for it if u have already made for it? https://forum.multitheftauto.com/viewtopic.php?f=91&t=93849
-
here is my example. weaponTable = { -- {weaponid,"weaponname"} {24,"Deagle"}, {26,"Model 1887"}, {31,"M4A1"}, } function giveWeaponCommand(source, cmd, weapon, amount) for _,value in ipairs(weaponTable) do if weapon ~= nil then if value[1] == tonumber(weapon) and amount ~= nil then outputChatBox("Your weapon is '"..value[2].."' and amount is '"..amount.."'",source) end end end end addCommandHandler('give', giveWeaponCommand)
-
you can check or zombie ped is in safezone, so if it is then kill ped.
-
Im not sure or this is what u want but basicly i made script that will play sound what admin is choosed to every player what is in server. CLIENT: sounds = { -- {"soundname.mp3",soundNumber} {"crafting.mp3",1}, {"fire.mp3",2}, } prefix = "[ADMIN SOUNDS]" function playAdminSound(source,sound) local player = getPlayerName(source) for _,value in ipairs(sounds) do if tonumber(sound) == value[2] then playSound("sounds/"..value[1],false) outputChatBox(prefix.." Sound was played by "..player.." and sound number is "..sound) end end end addEvent("playAdminSound",true) addEventHandler("playAdminSound",root,playAdminSound) SERVER: prefix = "[ADMIN SOUNDS]" function adminSoundCommand(source,cmd,sound) account = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..account,aclGetGroup("Admin")) then if sound ~= nil then triggerClientEvent(root,"playAdminSound",root,source,sound) else outputChatBox(prefix.." Please type command correct! example: /asound (1-2)",source) end else outputChatBox(prefix.." You must have admin access to use this command!",source) end end addCommandHandler("asound",adminSoundCommand)
-
addEventHandler 'onClientMouseWheel' --- on Wheel Move up or Down dxCreateScreenSource --- create Screen New dxUpdateScreenSource --- Update Screen dxDrawImage --- set Width and height + guiGetScreenSize + up Wheel , I need actual why to replace image not just draw it.
-
if it is nil then player account data "cash" is nil. if you want to dont give error until he gets actual money and saves it then use this code addEvent("AristatesOnServer", true) addEventHandler("AristatesOnServer", getRootElement(), function() local Aristates = getPlayerAccount(source) if Aristates then if tonumber(getAccountData(Aristates,"cash")) == nil then return end if tonumber(getAccountData(Aristates,"cash")) >= 50000 then setAccountData(Aristates,"cash",(tonumber(getAccountData(Aristates,"cash")) or 0)-50000) else outputChatBox ( "Yetersiz Para", source, 255, 255, 255, true ) end end end )
-
first of all, Lua is upper case sensivite langueage. If you dont write excalty how it should be it wont work. Like you wrote "setelementdata" it will not work, cause it should look like this "setElementData". And second, tables dont work like that, if table is edited like this "gameplayVariables["playerzombies"] = 6" it should be edited that same like this "gameplayVariables["playerzombies"] = 0". And yes you could try do that, or find actual function that spawns zombies and rewrite it a bit, so it tells if player is in safezone, then dont spawn those damn zombies. Also im sorry if i made some mistakes in writing, cause im not as good in english.
-
yes but what to do if he have mouse2 rebind to other key?
-
so then you could tell me how i can change it?
-
Hey. How i could change camera zooming image (when u take camera and hold mouse2) ?