icarus
-
Posts
33 -
Joined
-
Last visited
Posts posted by icarus
-
-
lol, thanks works, i tryed this but only in "poor" mode maybe thats why it didnt work, thanks
-
this time there is no Debugmessage and still not working
-
still not working DEBUGSCRIPT MESSAGE: ERROR:\client.lua:3:attempt to call global 'setWeaponPropriety' (a nil value)
-
still not working, omg, just a simple thing gives more work that a bunch of bigger things.
-
yeah lol, this must be simplier, but still cant work with it
---clientside function tazerreload( startedRes ) setWeaponProperty ( 23, "maximum_clip_ammo", 1 ) end addEventHandler( "onClientResourceStart", getLocalPlayer( ),tazerreload)
-
still aint working
-
yeah lol, but still i changed that, in jay's version and my version, still doesnt work
-
no, no errors, and still doesnt work, idk whats wrong with it.
-
still doesnt work
ps:u can use
---this
insted of pastbin
-
I made this but for idk why it doesnt work, it doesnt even output a debugscript message, can u help ?
---Clientside function reloadtazerclient () if getPedWeapon ( getLocalPlayer())== 23 then triggerServerEvent ("ontazershoot", getLocalPlayer()) end end addEventHandler ("onClientPedWeaponFire", getRootElement(), reloadtazerclient)
---Serverside addEvent ("ontazershoot", true) function tazershootserverside(sourcePlayer) reloadPedWeapon ( sourcePlayer ) end addEventHandler("ontazershoot", getRootElement(),tazershootserverside)
(i already tryed "(source)" insted of "(sourcePlayer)", and "weapon == 23" insted of " getPedWeapon ( getLocalPlayer())== 23", and didnt work.
-
sorry, probably some bug, i tryed many times earlier and didnt work, tryed just now and works, thanks anyway.
-
I made this part, i already tryed "if", nbut didnt work, so i tryed "if not", still the same.
this is part of the script
---serverside function checkBBHQspawn() if not isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( source ) ), aclGetGroup( "Admin" ) ) then triggerClientEvent ("onnotHQverification", source) else setPlayerNametagColor ( source, 255, 140, 0 ) spawnPlayer ( source, 2392, 2792, 14, 180, 211, 0, 0, blackbulletsteam ) giveWeapon ( source, 31, 500) giveWeapon ( source, 27, 500) giveWeapon ( source, 24, 150) giveWeapon ( source, 34, 150) giveWeapon ( source, 46, 150) giveWeapon ( source, 16, 30) end end addEventHandler("onHQbbmembersbutton", getRootElement(),checkBBHQspawn)
---Clientside addEvent ("onnotHQverification", true) function ifnotBBHQ() outputChatBox ( "#FF0000You need to be HQ or Admin to spawn as HQ", 255, 255, 255, true ) end addEventHandler("onnotHQverification",getLocalPlayer(),ifnotBBHQ)
I dont know whats the problem, it outputs the chatbox, but it still it lets the player spawn, can u help me on this ?
-
thanks, it works , i have other question, if i wanted to match a random place how could i do it.
Like in this
function (attacker, gun) if getTeamName(getPlayerTeam(attacker)) == "Police" then -- if attacker was a cop if gun == 23 or gun == 3 then -- if it was a tazer or stick setElementPosition(source, -643.82635498047, 1945.7033691406, 2) setElementPosition(source, -1980, 4991, 39)-- set there position end end end )
i wanted to make it to warp it or to a place or to the other
-
i was trying to make that when a player that is inside a colshape after a timer get warped to a place.
I dont know whats wrong with this.
function warpplayer ( thePlayer ) if isElementWithinColShape ( thePlayer, Bankcol ) then setElementPosition ( thePlayer, 2655, 2706, 411 ) end end
Also tryed this, actually i tyed this first
function warpplayer ( source ) if isElementWithinColShape ( source, Bankcol ) then setElementPosition ( source, 2655, 2706, 411 ) end
The debugscript 3 message is always the same: Bad argument @ "isElementWithinColShape" [Expected element at argument 1]
Can someone help me at this ?
-
ive been trying all day, but i think it works now.
-
bump
-
Sorry to bother again.
What i wanna do is make is add a new gui that is almost equal to the other , but the difference is that i want to change they keypad window name to other that opens when i hit another marker, and updates other trigger vent, and the code is different.
I tried doing it , but the results are almost everytime the same, like the display of the first gui shows in the second, the code is the same at the 2 guis. The Guis confuse themselves.
can you help me, what do i need to add to the version i uploaded here client/server side , in order to make it work and simple.
-
Thanks for the help.
-
Actually, for what im doing its needed, cuz after it i wanna delete the Marker, for everyone after a player opens the gui.
-
So what i wanna make is, create a marker at serverside, and when a player hits that marker it shows a gui that is at clientside.
I made this but doesnt work, can someone help me.
-----Serverside local door1marker = createMarker ( 2655, 2706, 411, "arrow", 1, 100, 20, 20 ) function door1markerhit( hitElement, matchingDimension ) if getElementType( hitElement ) == Player then triggerClientEvent ( Player, "ondoor1markerhit", Player ) end end addEventHandler( "onMarkerHit", door1marker, door1markerhit )
----Clientside addEvent ( "ondoor1markerhit", true ) function showguidoor1 () guiSetVisible(keypadWindow,true) showCursor(true,true) setElementData(keypadWindow,"keypadID","GateKeypadCode") end addEventHandler( "ondoor1markerhit", getLocalPlayer ( ), showguidoor1 )
-
Works 100% as it should. Thanks .
-
kk, client side is this, the problem is probably there, im new at scripting,so thats probably it.
local bankrob = createMarker ( 2655, 2706, 411, "arrow", 1, 100, 20, 20 ) function createKeypad() local sWidth, sHeight = guiGetScreenSize() local Width,Height = 142,276 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) keypadWindow = guiCreateWindow(X,Y,Width,Height,"Keypad",false) addEventHandler("onClientGUIClick",keypadWindow,processKeypadClicks,true) guiWindowSetSizable(keypadWindow,false) keypadButton1 = guiCreateButton(13,68,37,36,"1",false,keypadWindow) keypadButton2 = guiCreateButton(53,68,37,36,"2",false,keypadWindow) keypadButton3 = guiCreateButton(93,68,37,36,"3",false,keypadWindow) keypadButton4 = guiCreateButton(13,108,37,36,"4",false,keypadWindow) keypadButton5 = guiCreateButton(53,108,37,36,"5",false,keypadWindow) keypadButton6 = guiCreateButton(93,108,37,36,"6",false,keypadWindow) keypadButton7 = guiCreateButton(13,148,37,36,"7",false,keypadWindow) keypadButton8 = guiCreateButton(53,148,37,36,"8",false,keypadWindow) keypadButton9 = guiCreateButton(93,148,37,36,"9",false,keypadWindow) keypadButtonAsterix = guiCreateButton(13,188,37,36,"*",false,keypadWindow) keypadButton0 = guiCreateButton(53,188,37,36,"0",false,keypadWindow) keypadButtonHash = guiCreateButton(93,188,37,36,"#",false,keypadWindow) keypadButtonExit = guiCreateButton(13,228,37,36,"Exit",false,keypadWindow) keypadButtonEnter = guiCreateButton(53,228,37,36,"Enter",false,keypadWindow) keypadButtonClear = guiCreateButton(93,228,37,36,"Clear",false,keypadWindow) keypadGridlistDisplay = guiCreateGridList(13,25,117,33,false,keypadWindow) guiGridListSetSelectionMode(keypadGridlistDisplay,2) guiSetAlpha(keypadGridlistDisplay,0.6) keypadLabelDisplay = guiCreateLabel(14,26,115,30,"Enter Keycode.",false,keypadWindow) guiLabelSetColor(keypadLabelDisplay,255,000,000) guiLabelSetVerticalAlign(keypadLabelDisplay,"center") guiLabelSetHorizontalAlign(keypadLabelDisplay,"center",false) guiSetVisible(keypadWindow,false) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),createKeypad) function updateDisplay(text) if text then if tonumber(text) or text == "*" or text == "#" then guiSetText(keypadLabelDisplay,guiGetText(keypadLabelDisplay) .. text) else guiSetText(keypadLabelDisplay,text) end else guiSetText(keypadLabelDisplay,"") end end function processKeypadClicks(button,state) if button == "left" and state == "up" then if getElementType(source) == "gui-button" then triggerEvent("onKeypadButtonClicked",source,getElementData(keypadWindow,"keypadID")) end end end addEvent("onKeypadButtonClicked",false) addEventHandler("onKeypadButtonClicked",root, function(keypadID) if guiGetText(keypadLabelDisplay) == "Enter Keycode." or guiGetText(keypadLabelDisplay) == "Lower" or guiGetText(keypadLabelDisplay) == "Higher" then updateDisplay() end if guiGetText(source) == "Clear" then updateDisplay() elseif guiGetText(source) == "Enter" then local code = guiGetText(keypadLabelDisplay) if code then triggerServerEvent("verifyKeypadCode",getLocalPlayer(),code,keypadID) end elseif guiGetText(source) == "Exit" then guiSetVisible(keypadWindow,false) updateDisplay("Enter Keycode.") showCursor(false,false) else updateDisplay(guiGetText(source)) end end ) addEvent("onKeypadVerificationSuccessful",true) addEventHandler("onKeypadVerificationSuccessful",root, function() guiSetVisible(keypadWindow,false) updateDisplay("Enter Keycode.") showCursor(false,false) end ) addEvent("oncodeishigher",true) addEventHandler("oncodeishigher",root, function() updateDisplay("Higher") end ) addEvent("oncodeislower",true) addEventHandler("oncodeislower",root, function() updateDisplay("Lower") end )
-
same debug script: ERROR:server.lua:13: attempt to compare nil with string
-
you mean, like this ?
local keypadCodes = { ["a51MainGateKeypadCode"] = math.random (0, 50000) } addEvent("verifyKeypadCode",true) addEventHandler("verifyKeypadCode",root,function(code,keypadID) if code then if code == tonumber(code) then triggerClientEvent(client,"onKeypadVerificationSuccessful",client,keypadID) elseif code >= tonumber(code) then triggerClientEvent(client,"oncodeishigher",client,keypadID) elseif code <= tonumber(code) then triggerClientEvent(client,"oncodeislower",client,keypadID) end end end)
Problems With connection Timing Out and Network troble
in Client
Posted · Edited by icarus
So this is a problem i've been having a lot , and not just at a specific server, but all.
What happens is, im in a server playing normaly, then i get " Network trouble" then i get kicked out because of that. After that, i get a good time without being able to connect to any server, always get "timed out".
Now this is a thing that happens a lot to me, at any server, and then i check my internet conection and there are no problems whatsoever, so that wouldnt be the problem either, also the computer is pretty good.
I used MTADiag, is it safe to share it here?
Edit: there was a mistake and i thought i did post this but i didnt, so if the MTADiag log is requiered ill have to do it again.