-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Is this a joke?
-
What exactly doesn't work?
-
There isn't, also this is really easy to make, but i won't do it because i want you to learn it by yourself
-
Are you stu*** or what? do you even know the Scripting basics? it's obiously that you must change it... setTeamFriendlyFire(teamElement, false) https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
I hate lazy people, but you can go to this website and search there. https://community.multitheftauto.com/
-
I fixed the server side part, since i'm busy right now, i can't check the client side part.
-
Volk-rus, please don't TRIPLE post! wait for someone else to answer.
-
Not you, lol. I meant this: "And one thing for Solidsnake14: Hello you remeber my ped topic? u said for no one give me the code now i don't asked for code i only need a help with setTimer and look the other topic they come and post and now u cant say i asked for code ;D Cya!"
-
function outbreak() -- "source" is the player event. local account = getPlayerAccount(source) if (account) then local doob = getAccountData( source, "Experience:" ) local doob2 = getAccountData( source, "Level:") if (doob) then setElementData ( source, "Experience:", doob ) setElementData ( source, "Level:", doob2 ) else setElementData ( source, "Experience:", 0 ) setElementData ( source, "Level:", 0 ) end end end addEventHandler("onPlayerLogin", getRootElement(), outbreak) function quit() -- "source" is the player event. local account = getPlayerAccount(source) if (account) then local Experience = getElementData(source,"Experience:") local Level = getElementData(source,"Level:",Level) setAccountData(source,"Experience:", Experience) setAccountData (source,"Level:",Level) end end addEventHandler("onPlayerQuit", getRootElement(),quit) function levelup() local XP = getElementData(source,"Experience:") if XP == 25 then setElementData ( source, "Level:", 2) outputChatBox ( source, "You Are Now Level 2!", source,0,255,0) end if XP == 75 then setElementData ( source, "Level:", 3) outputChatBox ( source, "You Are Now Level 3!", 0,255,0) end if XP == 150 then setElementData ( source, "Level:", 4) outputChatBox ( source, "You Are Now Level 4!",source, 0,255,0) end if XP == 300 then setElementData ( source, "Level:", 5) outputChatBox ( source, "You Are Now Level 5!",source, 0,255,0) end if XP == 425 then setElementData ( source, "Level:", 6) outputChatBox ( source, "You Are Now Level 6!",source, 0,255,0) end if XP == 650 then setElementData ( source, "Level:", 7) outputChatBox ( source, "You Are Now Level 7!",source,0,255,0) end end addEventHandler("onElementDataChange",getRootElement(),levelup) function deanimated (ammo, attacker, weapon, bodypart) if (attacker) then if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then if (getElementData (source, "zombie") == true) then local XP = getElementData ( attacker, "Experience:" ) if XP ~= false then setElementData ( attacker, "Experience:", XP+math.random(2,5)) else setElementData ( attacker, "Experience:", 1 ) end end end end end addEventHandler("onPedWasted", resourceRoot, deanimated)
-
Well, i had it done by my own way (less code) working, didn't wanted to post it because i wanted to leave you to fix it yourself.
-
I don't get what do you mean, explain yourself.
-
Thanks Ransom.
-
Notepad++ ftw, but yeah maybe for begginers, MTA script editor .
-
use the event handler onElementDataChange?
-
I think would be easier to make a table with the valid skin ids and then randomize from there
-
Is this code client side? because setPedControlState works only client side if i'm right.
-
I don't understand you, are you using Map editor or?
-
I don't understand you, you want to execute that mysql function for all online players? if so use: addEvent("blabla", true) addEventHandler("blabla", getRootElement(), function() for i,v in pairs(getElementsByType("player")) do playername = getPlayerName(v) local Save = "UPDATE players SET Function='1' WHERE username='" .. tostring(playername) .."'" mysql_query(sqllogin, Save) end end)
-
Acitano, your post is not needed, you already know it's solved.
-
If you won't be kicked, you must disable that anti cheat part at mtaserver.conf (i forgot which number was the AC for this)
-
This script has been stolen from my "c-panel" resource, any admin remove it please. https://community.multitheftauto.com/ind ... ls&id=1862
-
Server launcher? you can start a server opening MTA Server.exe.
-
No as far as i know.
-
Yeah, i guess so.
