-
Posts
1,239 -
Joined
-
Last visited
Everything posted by -.Paradox.-
-
elseif ip == "142.168.42.44" then --strings "" Thanks.
-
And how i can define the player ip?
-
Hello, is it possible to check if the player ip is (e.i: 142.168.42.44) and then setElementData to a (e.i flag.png)? Because there is some players without country flag, And i'm trying to do it in a stupid way That's my code. exports.scoreboard:addScoreboardColumn('Home') function showcountry() local flag = exports.admin:getPlayerCountry ( source ) local ip = getPlayerIP( source ) if flag then setElementData(source,"Home",":admin/client/images/flags/"..flag..".png") elseif ip == 142.168.42.44 then setElementData(source,"Home",":admin/client/images/flags/flag.png") else flag ="N/A" end end addEventHandler("onPlayerJoin",getRootElement(), showcountry)
-
I would do it for you if i had time, But without attaching the text to the player head, because it's pretty hard to make it...
-
Thank HyPex, You helped me a lot, I can fix your mistakes if i found (no offence)..
-
I don't want to be negative, But i'm trying to create my own..
-
Hello, can somebody tell me what can i use to create my own kill messages (using dxDraw)? Just tell me functions, and i'll post what i tried, Like example when i kill somebody it show a dx text and if killed another one it should appear another dx text but the first text should be up and the second text should be down etc.. Thank you in advance.
-
Just say that you didn't tried ^^
-
Logout* Btw how i can check when the player logout?
-
You're welcome.
-
Thanks TAPL, I did it already and it's working but when i Logout i'm still marked as an admin.. Is there a way to fix this? Code removed & Solved
-
Hello, Is there a client side function to check if the player is admin or moderator?
-
I need some help to add scripts / make a server with scripts
-.Paradox.- replied to lrakoon's topic in Scripting
Nobody is going to script a whole gamemode for you. In this section we help people with their codes. -
AttachElementToElement OnVehicleEnter DetachElements RemovePedFromVehicle
-
Actually there is, And i asked Castillo to tell me what is it, and he thought i'm talking about the error but i was talking about the event. Anyway, here is the event, onClientPlayerWeaponSwitch Thanks by the way.
-
Weapons\client.lua:11: Bad argument @'addEventHandler' [Expected function at argument 3, got nil' Client: function weapons( ) local icons = getPedWeapon(localPlayer) if icons then dxDrawImage(917, 53, 243, 123, ":Weapons/images/"..icons..".png") end end addEvent("onClientWeaponSwitch", true) addEventHandler( "onClientWeaponSwitch", root, function() addEventHandler("onClientRender", root, onTest) setTimer( function () removeEventHandler ( "onClientRender", root, weapons ) end, 3000, 1) end) Server: addEvent( "onPlayerWeaponSwitch" , true) addEventHandler( "onPlayerWeaponSwitch", getRootElement(), function() triggerClientEvent(source,"onClientWeaponSwitch", source) end) I'm trying to show that image when the player switch weapons.
-
No problem.
-
function des() local x,y,z = getElementPosition ( localPlayer ) createExplosion(x, y, z, 0, true, -1.0, false) end addCommandHandler ( "Boom", des )
-
Try this: function des() local x,y,z = getElementPosition ( source ) createExplosion ( x, y, z - 0.2, 2, false, true, false ) end addCommandHandler ( "Boom", des )
-
My code had many mistakes, I'm glad that Tete fixed it. You're welcome anyway.
-
This won't work, first, getVehicleID is a deprecated function, second, you're defining the vehicle without checking whether the killer is a player. This should work i guess: local reward = 200 function kill ( ammo, killer, killerweapon, bodypart ) if ( getElementType ( killer ) == "vehicle" ) then if ( getElementModel ( killer ) == 425 ) then local controller = getVehicleController ( killer ) givePlayerMoney ( controller, reward ) outputChatBox ("#ff8800[REWARD] #ffffffYou have killed " .. getPlayerName ( source ) .. " and rewarded $" .. reward, controller, 255, 255, 255, true ) end end end addEventHandler ( "onPlayerWasted", getRootElement(), kill ) My bad, this one should work yeah.
-
policeveh = { [598]=true, [596]=true, [597]=true, [599]=true } addEventHandler("onVehicleEnter", root, function () if (policeveh[getElementModel(source)]) then removePedFromVehicle(thePlayer) cancelEvent() end end)
