Scorpio Posted May 21, 2013 Share Posted May 21, 2013 الكود لما تموت تنتقل الى مكان واحدثيات معينا انا حطيتها لكن انا في السرفر في التيم الفريق لما اموت اروح للمكان وارجع الى احدثيات التيم وذيه الأكواد -- # Server Side : addEventHandler("onPlayerWasted",getRootElement(), function ( ) if ( getElementData ( source , "Group" ) == "B13" ) then spawnPlayer ( source , 251.19999694824, -1834.5, 3.2999999523163 ) end end ) Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 ي عزيزي متأكد انة مافية كود ثاني يسوي سباون بدون تحقق ؟ الكود اشوفة تمآم ؟ Link to comment
Scorpio Posted May 21, 2013 Author Share Posted May 21, 2013 ي عزيزي متأكد انة مافية كود ثاني يسوي سباون بدون تحقق ؟ الكود اشوفة تمآم ؟ يالغالي اشتغل 100 من مية لكن المشكلة لما انتقل ارجع للأحدثيات حجت التيم Link to comment
Scorpio Posted May 21, 2013 Author Share Posted May 21, 2013 تنتقل كيف ؟ مافهمت .. ؟ انت مسوي الكود لما اموت اروح للحدثيات صح هو شغال لكن اجي اشغل القيم مود حج اختيار الفريق لما اختار الفريق وانزل في الأحدثيات حجت الفريق واجي اموت اروح للمقر وارجع للأحدثيات الي حجت االتيم Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 ورني الكود اللي يوم تموت حق القيم .. onPlayerWasted Link to comment
Scorpio Posted May 21, 2013 Author Share Posted May 21, 2013 ورني الكود اللي يوم تموت حق القيم .. onPlayerWasted local x, y = guiGetScreenSize() createPed ( 1420.2261962891, -1601.6273193359, 13.546875 ) Garages = {1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30,105,106,107,102,103,104,108,109,110,114,115,116,280,281,282,283,284,285,286,288} SkinMusic = "data/music/SkinSelectMusic.mp3" SkinAnims = {"dnce_M_b","DAN_Left_A","DAN_Down_A","DAN_Loop_A"} StartSkin = 288 NewSkin = false addEventHandler("onClientResourceStart", resourceRoot, function() setElementData(getLocalPlayer(),"Score",getElementData(getLocalPlayer(),"Score")) end) function SelectSkin () setElementInterior ( getLocalPlayer(), 0, 0,0,0 ) setCameraMatrix( 3878.8999023438,-1610.0999755859,17.1, 3878.9900488281,-1607.4000244141,16.5 ) skin = createPed ( StartSkin, 3878.9900488281,-1608.4000244141,16.3,180 ) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) obStart = createObject ( 3095, 2986.8000488281,-677.09997558594,41.400001525879, 0, 0, 270 ) setElementAlpha( obStart, tonumber(0) ) fadeCamera( true, 10) setTime(0,0) SkinSelectMusic = playSound(SkinMusic,true) bindKey("arrow_r","down",NextSkin) bindKey("arrow_l","down",LastSkin) bindKey("enter","down",SpawnPlayer) showCursor(true) showChat(true) showPlayerHudComponent ( "radar", false ) end function spa() guiSetText(Gangs,"Police") guiLabelSetColor(Gangs,0,0,255) SelectSkin() FreezeBots() end addEvent( "spawn2", true ) addEventHandler( "spawn2", root, spa) addEvent( "spawn", true ) addEventHandler( "spawn", root, spa) chng = false bindKey("F4","down", function() if chng == false then triggerServerEvent("te", getLocalPlayer()) chng = true else triggerServerEvent("teCansel", getLocalPlayer()) chng = false end end) addEventHandler("onClientPlayerWasted", root, function() if chng == true then chng = false guiSetText(Gangs,"Team") guiLabelSetColor(Gangs,0,0,0) SelectSkin() FreezeBots() guiSetVisible(Gangs,true) end end) function SpawnPlayer() triggerServerEvent ( "onClientWantsToSpawn", getLocalPlayer(), getLocalPlayer(),StartSkin ) triggerServerEvent ( "getWea", getLocalPlayer()) unbindKey("arrow_r","down",NextSkin) unbindKey("arrow_l","down",LastSkin) unbindKey("lshift","down",SpawnPlayer) unbindKey("enter","down",SpawnPlayer) destroyElement(skin) destroyElement(obStart) setTime(12,0) stopSound(SkinSelectMusic) showCursor(false) showChat(true) showPlayerHudComponent ( "radar", true ) guiSetVisible(Gangs,false) setElementData(getLocalPlayer(),"red",r) setElementData(getLocalPlayer(),"green",g) setElementData(getLocalPlayer(),"blue",b) end function NextSkin() if StartSkin == 288 then guiSetText(Gangs,"Police") guiLabelSetColor(Gangs,0,0,255) StartSkin = 286 elseif StartSkin == 286 then StartSkin = 285 elseif StartSkin == 285 then StartSkin = 284 elseif StartSkin == 284 then StartSkin = 283 elseif StartSkin == 283 then StartSkin = 282 elseif StartSkin == 282 then StartSkin = 281 elseif StartSkin == 281 then StartSkin = 280 elseif StartSkin == 280 then guiSetText(Gangs,"Aztecas") guiLabelSetColor(Gangs,0,255,255) StartSkin = 116 elseif StartSkin == 116 then StartSkin = 115 elseif StartSkin == 115 then StartSkin = 114 elseif StartSkin == 114 then guiSetText(Gangs,"Vagos") guiLabelSetColor(Gangs,255,255,0) StartSkin = 110 elseif StartSkin == 110 then StartSkin = 109 elseif StartSkin == 109 then StartSkin = 108 elseif StartSkin == 108 then StartSkin = 107 guiSetText(Gangs,"Grove") guiLabelSetColor(Gangs,0,255,0) elseif StartSkin == 107 then StartSkin = 106 elseif StartSkin == 106 then StartSkin = 105 elseif StartSkin == 105 then StartSkin = 104 guiSetText(Gangs,"Ballas") guiLabelSetColor(Gangs,255,0,255) elseif StartSkin == 104 then StartSkin = 103 elseif StartSkin == 103 then StartSkin = 102 elseif StartSkin == 102 then guiSetText(Gangs,"No Team") guiLabelSetColor(Gangs,255,255,255) StartSkin = 30 elseif StartSkin == 30 then StartSkin = 29 elseif StartSkin == 29 then StartSkin = 28 elseif StartSkin == 28 then StartSkin = 27 elseif StartSkin == 27 then StartSkin = 26 elseif StartSkin == 26 then StartSkin = 25 elseif StartSkin == 25 then StartSkin = 24 elseif StartSkin == 24 then StartSkin = 23 elseif StartSkin == 23 then StartSkin = 22 elseif StartSkin == 22 then StartSkin = 21 elseif StartSkin == 21 then StartSkin = 20 elseif StartSkin == 20 then StartSkin = 19 elseif StartSkin == 19 then StartSkin = 18 elseif StartSkin == 18 then StartSkin = 17 elseif StartSkin == 17 then StartSkin = 16 elseif StartSkin == 16 then StartSkin = 15 elseif StartSkin == 15 then StartSkin = 14 elseif StartSkin == 14 then StartSkin = 13 elseif StartSkin == 13 then StartSkin = 12 elseif StartSkin == 12 then StartSkin = 11 elseif StartSkin == 11 then StartSkin = 10 elseif StartSkin == 10 then StartSkin = 9 elseif StartSkin == 9 then StartSkin = 7 elseif StartSkin == 7 then StartSkin = 2 elseif StartSkin == 2 then StartSkin = 1 elseif StartSkin == 1 then StartSkin = 288 guiSetText(Gangs,"Police") guiLabelSetColor(Gangs,0,0,255) end setElementModel(skin,StartSkin) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) SkinJobTextColor() Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 اقصد اللي يوم يصير لة سباون يوم ينتقل يوم يموت اللي فية مشكلة وش دخل ذا بالموضوع؟! Link to comment
HoLsTeN Posted May 21, 2013 Share Posted May 21, 2013 أبحث عن spawnPlayer في ملفات السيرفر واذا حصلته اكتب الفنكشن كامل حقه ... Link to comment
Scorpio Posted May 21, 2013 Author Share Posted May 21, 2013 اقصد اللي يوم يصير لة سباون يوم ينتقل يوم يموت اللي فية مشكلة وش دخل ذا بالموضوع؟! مود اختيار الفريق شغال مو خربان المشكلة من الكود Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 يخوي عارف بس لازم تسوي تحقق اطرح كودك حق القيم onPlayerWasted - spawnPlayer -.- Link to comment
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