
Xeno
Members-
Posts
728 -
Joined
-
Last visited
Everything posted by Xeno
-
Nothing is Displayed in the chat box.
-
Yes the timer is after the function, And what do you mean by values.? I use "player" for this: local team = getPlayerTeam(player)
-
If I was going to set a timer on a function, and I was using "player", would I make the timer like this: setTimer(wafflecheese, 1000,1, player) Because I get a bad argument if I put it in the function like this, function wafflecheese(player)
-
Yeah, I was doing it right before aswell, I just got some things mixed up, Thank you
-
NVM: I WAS TESTING IT WRONG, LOLOLOL I know, its the easeist thing in the world, but its gone right out my head and I have no clue how to do it??? I know you have to check the team... I came up with this, but its a mess: local police = getTeamFromName("Police") playerteam = getPlayerTeam (source) if playerteam == police then Thanks, Xeno
-
It wasn't really my script, Castillo made it, I just copied it from another topic. Anyway - Ill search for a topic for you.
-
Meta: meta> <info author="" version="1" type="script" name="" description="" /> <script src="client.lua" type="client" /> <script src="server.lua" type="server" /> </meta> Put this in server.lua : addEvent( "giveWeapon",true) addEventHandler( "giveWeapon",root, function( ) giveWeapon ( source, 27, 21 ) end ) And put this in client.lua : function Markerhit ( hitPlayer, matchingDimension ) outputChatBox ( getPlayerName( hitPlayer ) .. "Get a Combat Shotgun!! RUN!!" ) triggerServerEvent( "giveWeapon",hitPlayer ) setPedDoingGangDriveby ( hitPlayer, true ) end addEventHandler ( "onClientMarkerHit", root, MarkerHit ) PS. IF YOU READ THE TUTORIALS, YOU WILL UNDERRRSTANNNNDD
-
No, I do not know how to record time. But search around the forums (as I did with the zombie saving) and you may find it.
-
Server side.
-
Ok guys, calm down, im sure he's just new to MTA... As the others suggested, I would recommend you too learn LUA, here is a link: https://wiki.multitheftauto.com/wiki/Scripting_Introduction
-
If you cant find it, then here, I think this works, (And I think its Slothmans) exports.scoreboard:addScoreboardColumn('Zombie kills') addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function (killer) givePlayerMoney(killer,100) addPlayerZombieKills(killer) end) function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if not zombieKills then setAccountData(account,"Zombie kills",0) end setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if zombieKills then setElementData(source,"Zombie kills",tostring(zombieKills)) else setElementData(source,"Zombie kills",0) end end)
-
setTimer(setElementHealth, 1000, 1,player, 100)
-
Try adding the resource to the ACL.
-
What would be a correct script for a teleporting system
Xeno replied to stormchaser206's topic in Scripting
If you don't know how to make a meta, and you started scripting today, read this: https://wiki.multitheftauto.com/wiki/Scripting_Introduction -
What would be a correct script for a teleporting system
Xeno replied to stormchaser206's topic in Scripting
Post your script, we can help you. -
Thank you for the code, this will help me alot
-
Ok, so now should I set a timer that destroys the col? EDIT: Wait, he added it. NVM.
-
Trying to get the nearest vehicle to warp too me, - Sorry didn't make it clear
-
Ok thats fine, but when I do setElementPosition ( [What would I put here? There is no specified name) Thanks, Xeno.
-
How..? (Sorry im a noob) getElementRoot()?
-
So it would not be possible to get the nearest Element?
-
vehicle1x, vehicle1y, vehicle1z = getElementPosition ( vehicle1 ) -- HERE I would get all the local vehicles? vehicle2x, vehicle2y, vehicle2z = getElementPosition ( vehicle2 ) -- SO HERE I would put the local player? --Warp stuff here?
-
What functions would I use to get the nearest element to the localplayer? so like a car, object, ect. Thanks, Xeno.