Tomek123 Posted February 5, 2011 Author Posted February 5, 2011 Ah not work i try -- this function is called whenever someone types 'createmarker' in the console: function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) -- get the player's position -- create a cylindrical marker next to the player: local theMarker = createMarker ( -376.8867 + 2, 2251.6767 + 2, 42.4843, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then -- check if the marker was created successfully outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", consoleCreateMarker ) why not work?
SDK Posted February 5, 2011 Posted February 5, 2011 (edited) -snip- I should look better Edit: btw, this is a modified example from the wiki you're using, are you still trying to make that teleport? Edited February 5, 2011 by Guest
Tomek123 Posted February 5, 2011 Author Posted February 5, 2011 I try to make that man come in until the marker to put it into a hotel and a hotel that can get out there on where it came
Castillo Posted February 5, 2011 Posted February 5, 2011 Woot? i don't get him, i suposed he was trying to create a marker with that example of wiki o_o
SDK Posted February 5, 2011 Posted February 5, 2011 How do you want to create the marker for teleporting? Should it be on resource start or when a player types /createmarker?
Tomek123 Posted February 5, 2011 Author Posted February 5, 2011 i try with this /createmarker but not work BTW. what is here wrong i try create Zombie kills saver but this script not serve kills function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getPlayerMoney ( source ) setAccountData ( playeraccount, "play.kill", playeZombieWasted ) end end function onPlayerJoin ( ) -- when a player joins, retrieve his money amount from his account data and set it local playerZombieWasted = getPlayerAccount ( source ) if ( playeraccount ) then local playeZombieWasted = getAccountData ( playeraccount, "play.kill" ) -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playerZombieWasted ) then setPlayerZombieWasted ( source, playerZombieWasted ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin )
Castillo Posted February 6, 2011 Posted February 6, 2011 WTF IS THAT? it's using functions that don't even exist, this makes completely no sense (no offense), function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then kills = getElementData(source,"Zombie kills") setAccountData ( playeraccount, "play.kill", kills ) end end function onPlayerLogin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local kills = getAccountData ( playeraccount, "play.kill" ) if ( kills ) then setElementData ( source, "Zombie kills", kills ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) try that.
Castillo Posted February 8, 2011 Posted February 8, 2011 This resource is a Vehicle + Weapon + Skills shop. https://community.multitheftauto.com/index.php?p= ... ils&id=720
Tomek123 Posted February 9, 2011 Author Posted February 9, 2011 Ty, but have somthing like gun shop in single player?
Castillo Posted February 9, 2011 Posted February 9, 2011 (edited) Oh, so you are a prince huh? know what? you should make it by yourself. https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI https://wiki.multitheftauto.com/wiki/Scr ... troduction Edited February 9, 2011 by Guest
Castillo Posted February 11, 2011 Posted February 11, 2011 You didn't even search for it, you can find it on a quick look at wiki's main page. https://wiki.multitheftauto.com/wiki/CJ_Clothes
Tomek123 Posted February 11, 2011 Author Posted February 11, 2011 function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then clothes = getPedClothes" class="kw2">getPedClothes(source,"PlayerClothes") setAccountData ( playeraccount, "play.clothes", playerclothes ) end end function onPlayerJoin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerclothes = getAccountData ( playeraccount, "play.clothes" ) if ( playerclothes ) then setPedClothes ( source, "PlayerClothes", clothes ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) I start debugscript 3 and here not have warnings what is wrong pls help!
Tomek123 Posted February 11, 2011 Author Posted February 11, 2011 You didn't even search for it, you can find it on a quick look at wiki's main page.https://wiki.multitheftauto.com/wiki/CJ_Clothes Tnx i go try with this id make saver
proracer Posted February 11, 2011 Posted February 11, 2011 function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then clothes = getPedClothes" class="kw2">getPedClothes(source,"PlayerClothes") setAccountData ( playeraccount, "play.clothes", playerclothes ) end end function onPlayerJoin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerclothes = getAccountData ( playeraccount, "play.clothes" ) if ( playerclothes ) then setPedClothes ( source, "PlayerClothes", clothes ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) I start debugscript 3 and here not have warnings what is wrong pls help! 1. getPedClothes retrieves 2 strings (clothes texture, clothes model) and also you used the wrong arguments, can't you read Wiki? It clearly says it needs ped element (which you put correctly) and integer (and you have put a string in there). 2. setPedClothes doesn't exist, you must use addPedClothes. Read a little! https://wiki.multitheftauto.com/wiki/GetPedClothes https://wiki.multitheftauto.com/wiki/AddPedClothes
Tomek123 Posted February 11, 2011 Author Posted February 11, 2011 function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then clothes = getPedClothes" class="kw2">getPedClothes(source,"PlayerClothes") setAccountData ( playeraccount, "play.clothes", playerclothes ) end end function onPlayerJoin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerclothes = getAccountData ( playeraccount, "play.clothes" ) if ( playerclothes ) then setPedClothes ( source, "PlayerClothes", clothes ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) I start debugscript 3 and here not have warnings what is wrong pls help! 1. getPedClothes retrieves 2 strings (clothes texture, clothes model) and also you used the wrong arguments, can't you read Wiki? It clearly says it needs ped element (which you put correctly) and integer (and you have put a string in there). 2. setPedClothes doesn't exist, you must use addPedClothes. Read a little! https://wiki.multitheftauto.com/wiki/GetPedClothes https://wiki.multitheftauto.com/wiki/AddPedClothes I try with this and console say me "Bad argument @ "addPedClothes"
Tomek123 Posted February 11, 2011 Author Posted February 11, 2011 OMG this is so hard i trying and nothing ;(
proracer Posted February 11, 2011 Posted February 11, 2011 Can you tell us what you actually want so it's easier for us..?
Tomek123 Posted February 11, 2011 Author Posted February 11, 2011 I want make script for save CJ clothes.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now