bebo1king Posted January 9, 2016 Posted January 9, 2016 (edited) Hello, I was trying to make CJ edit his body muscle but it dont work My Code : function CjCreating () CJ = createPed (0,352.5,-256.29998779297,715,90) setElementDimension (CJ , 200) addPedClothes (CJ,"hawaiired","hawaii",59) addPedClothes (CJ,"afrogoatee","afro",32) addPedClothes (CJ,"worktrcamogrn","worktr",1) addPedClothes (CJ,"bask1prowht","bask1",17) addPedClothes (CJ,"neckhash","neck",4) addPedClothes (CJ,"watchsub1","watch",0) addPedClothes (CJ,"glasses04dark","glasses04",10) addPedClothes (CJ,"capzipup","caprimup",40) triggerServerEvent ("CJAPS",CJ,23,950) setTimer (setPedAnimation,500,1,CJ, "BEACH", "ParkSit_M_loop") setElementFrozen (CJ,true) end addEventHandler ("onClientResourceStart",root,CjCreating) Edited January 10, 2016 by Guest Skype :bebo.ahmad34 My channel on youtupe : https://www.youtube.com/channel/UCOXfmMopyyBL5NBeO0RS04g/videos
Revolt Posted January 9, 2016 Posted January 9, 2016 You are using the index instead of clothing type. addPedClothes (CJ,"hawaiired","hawaii",0) -- not 59 -- and so on... Need a scripter? Feel free to contact me for inexpensive high-quality service! Skype username: friedonibot
bebo1king Posted January 9, 2016 Author Posted January 9, 2016 You are using the index instead of clothing type. addPedClothes (CJ,"hawaiired","hawaii",0) -- not 59 -- and so on... i just saw it in the wiki thx the new proBlem now in trigger its not working -- Server function CJAPSs(client,health) setPedStat (source,client,health) end addEvent("CJAPS",true) addEventHandler("CJAPS",root,CJAPSs) Skype :bebo.ahmad34 My channel on youtupe : https://www.youtube.com/channel/UCOXfmMopyyBL5NBeO0RS04g/videos
Revolt Posted January 9, 2016 Posted January 9, 2016 -- CLIENT triggerServerEvent ("CJAPS",root,23,950) -- SERVER function CJAPSs(stat,value) setPedStat (client,stat,value) end addEvent("CJAPS",true) addEventHandler("CJAPS",root,CJAPSs) 'client' is a predefined variable. Maybe this would work. Need a scripter? Feel free to contact me for inexpensive high-quality service! Skype username: friedonibot
bebo1king Posted January 10, 2016 Author Posted January 10, 2016 -- CLIENT triggerServerEvent ("CJAPS",root,23,950) -- SERVER function CJAPSs(stat,value) setPedStat (client,stat,value) end addEvent("CJAPS",true) addEventHandler("CJAPS",root,CJAPSs) 'client' is a predefined variable. Maybe this would work. It did'nt work Skype :bebo.ahmad34 My channel on youtupe : https://www.youtube.com/channel/UCOXfmMopyyBL5NBeO0RS04g/videos
ViRuZGamiing Posted January 10, 2016 Posted January 10, 2016 triggerServerEvent("CJAPS", CJ, 24, 999) -- 24 is Max Health, 999 the value function CJAPSs(stat, value) setPedStat(source, stat, value) end addEvent("CJAPS",true) addEventHandler("CJAPS", getRootElement(), CJAPSs) "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
bebo1king Posted January 10, 2016 Author Posted January 10, 2016 triggerServerEvent("CJAPS", CJ, 24, 999) -- 24 is Max Health, 999 the value function CJAPSs(stat, value) setPedStat(source, stat, value) end addEvent("CJAPS",true) addEventHandler("CJAPS", getRootElement(), CJAPSs) Still not working Skype :bebo.ahmad34 My channel on youtupe : https://www.youtube.com/channel/UCOXfmMopyyBL5NBeO0RS04g/videos
Castillo Posted January 10, 2016 Posted January 10, 2016 You can't change the stats of the ped for the simple reason that the ped is created client-side, so the server is not aware of it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
bebo1king Posted January 10, 2016 Author Posted January 10, 2016 You can't change the stats of the ped for the simple reason that the ped is created client-side, so the server is not aware of it. If this what you mean : function CjCreating () CJ = createPed (0,352.5,-256.29998779297,715,90) setElementDimension (CJ , 200) addPedClothes (CJ,"tshirtmaddgrn","tshirt",0) addPedClothes (CJ,"afrogoatee","afro",1) addPedClothes (CJ,"worktrcamogrn","worktr",2) addPedClothes (CJ,"conv","convproblk",3) addPedClothes (CJ,"dogtag","neck",13) addPedClothes (CJ,"watchsub1","watch",14) addPedClothes (CJ,"glasses04dark","glasses04",15) setPedStat(CJ, 23, 999) setTimer (setPedAnimation,500,1,CJ, "BEACH", "ParkSit_M_loop") setElementFrozen (CJ,true) end addEventHandler ("onResourceStart",root,CjCreating) it didn't work too i put it in Server side now and it still not working + no bug in debug Skype :bebo.ahmad34 My channel on youtupe : https://www.youtube.com/channel/UCOXfmMopyyBL5NBeO0RS04g/videos
TAPL Posted January 10, 2016 Posted January 10, 2016 addEventHandler("onResourceStart", resourceRoot, function() CJ = createPed(0, 352.5, -256.3, 715, 90) setTimer(function() setElementDimension(CJ , 200) addPedClothes(CJ, "tshirtmaddgrn", "tshirt", 0) addPedClothes(CJ, "afrogoatee", "afro", 1) addPedClothes(CJ, "worktrcamogrn", "worktr", 2) addPedClothes(CJ, "conv", "convproblk", 3) addPedClothes(CJ, "dogtag", "neck", 13) addPedClothes(CJ, "watchsub1", "watch", 14) addPedClothes(CJ, "glasses04dark", "glasses04", 15) setPedStat(CJ, 23, 999) setPedAnimation(CJ, "BEACH", "ParkSit_M_loop") setElementFrozen(CJ, true) end, 500, 1) end)
bebo1king Posted January 10, 2016 Author Posted January 10, 2016 addEventHandler("onResourceStart", resourceRoot, function() CJ = createPed(0, 352.5, -256.3, 715, 90) setTimer(function() setElementDimension(CJ , 200) addPedClothes(CJ, "tshirtmaddgrn", "tshirt", 0) addPedClothes(CJ, "afrogoatee", "afro", 1) addPedClothes(CJ, "worktrcamogrn", "worktr", 2) addPedClothes(CJ, "conv", "convproblk", 3) addPedClothes(CJ, "dogtag", "neck", 13) addPedClothes(CJ, "watchsub1", "watch", 14) addPedClothes(CJ, "glasses04dark", "glasses04", 15) setPedStat(CJ, 23, 999) setPedAnimation(CJ, "BEACH", "ParkSit_M_loop") setElementFrozen(CJ, true) end, 500, 1) end) It worked now thank you very much TAPL + Thank you all for your help Skype :bebo.ahmad34 My channel on youtupe : https://www.youtube.com/channel/UCOXfmMopyyBL5NBeO0RS04g/videos
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