αвυ-wαleed Posted March 29, 2014 Share Posted March 29, 2014 ابغى كود احطة في المود المود مايشتغل المود الا اذا سويت login Link to comment
iPrestege Posted March 29, 2014 Share Posted March 29, 2014 ابغى كود احطة في المود المود مايشتغل المود الا اذا سويت login isGuestAccount getPlayerAccount Link to comment
فاّرس Posted March 29, 2014 Share Posted March 29, 2014 if isGuestAccount(getPlayerAccount(source)) then return end * source = غير معرف , عرفه على حسب كودك... Link to comment
αвυ-wαleed Posted March 29, 2014 Author Share Posted March 29, 2014 وين احط الكود StartMoney = 500 CashForKill = 150 PayNSprayCost = 100 playerSkin = {} Garages = {0,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, 31,32,33,34,35,36,37,38,39,40, 41,42,43,44,45,46,47,48,49} function SpawnPlayer(thePlayer,skin,r,g,b) spawnPlayer ( thePlayer, 1539.7673339844,-1352.8256835938,329.46545410156, 90.0, skin ) setCameraTarget (source, source) createBlipAttachedTo(source,0,2,r,g,b) setPlayerMoney(thePlayer,StartMoney) playerSkin[thePlayer] = {skin,r,g,b} setElementData(thePlayer,"Score",0) setPlayerNametagShowing ( thePlayer, false) end addEvent( "onClientWantsToSpawn", true ) addEventHandler( "onClientWantsToSpawn", getRootElement(), SpawnPlayer ) addEventHandler ( "onPlayerQuit", getRootElement(), function() local attachedElements = getAttachedElements ( source ) if ( attachedElements ) then for k,v in ipairs ( attachedElements ) do if ( getElementType ( v ) == "blip" ) then destroyElement(v) else end end end end) function PlayerDied(ammo,killer) if killer and getElementType ( killer ) == "player" then setPlayerMoney(killer,getPlayerMoney(killer)+CashForKill) local Score = getElementData(killer,"Score") setElementData(killer,"Score",Score+1) end setTimer(PlayerRespawn,1000,1,source) end addEventHandler("onPlayerWasted",getRootElement(),PlayerDied) function PlayerRespawn(diedPlayer) if not diedPlayer then else toggleAllControls(diedPlayer,true) setPlayerMoney(diedPlayer,StartMoney) spawnPlayer ( diedPlayer, 1539.7673339844,-1352.8256835938,329.46545410156, 90.0,playerSkin[diedPlayer][1]) setCameraTarget (diedPlayer, diedPlayer) end end function FixPlayerVehicle(hitElement,number) local money = getPlayerMoney(hitElement) if money < PayNSprayCost then outputChatBox("*PM: You don't have enought cash.",hitElement,170,0,0,true) else if getPedOccupiedVehicle(hitElement) then local vehicle = getPedOccupiedVehicle(hitElement) fixVehicle(vehicle) playSoundFrontEnd(hitElement,16) toggleAllControls(hitElement,false) setPlayerMoney(hitElement,money-PayNSprayCost) local vehicle = getPedOccupiedVehicle(hitElement) setElementFrozen(vehicle,true) setTimer(function() toggleAllControls(hitElement,true) setCameraTarget (hitElement, hitElement) setElementFrozen(vehicle,false) end,2500,1) if number == 1 then setCameraMatrix(hitElement,1032.7685546875,-1039.337890625,45.220012664795,1030.095703125,-1027.6357421875,40.220008850098) elseif number == 2 then setCameraMatrix(hitElement,489.150390625,-1728.8310546875,31.169326782227,488.6884765625,-1734.04296875,21.179261207581) elseif number == 3 then setCameraMatrix(hitElement,2076.5859375,-1831.4208984375,18.546875,2072.626953125,-1831.361328125,18.546875) else end end end end addEvent( "onBoughtWeapon", true ) addEventHandler( "onBoughtWeapon", getRootElement(), function(thePlayer,id,cash) setPlayerMoney(thePlayer,getPlayerMoney(thePlayer)-cash) if id == 500 then setPedArmor ( thePlayer, 100 ) else giveWeapon ( thePlayer, id, 120 ) end end) addEvent( "onBoughtBurger", true ) addEventHandler( "onBoughtBurger", getRootElement(), function(thePlayer,cash) setPlayerMoney(thePlayer,getPlayerMoney(thePlayer)-cash) setElementHealth(thePlayer,getElementHealth(thePlayer)+cash) if getElementHealth > 100 then setElementHealth(thePlayer,100) end end) Link to comment
فاّرس Posted March 29, 2014 Share Posted March 29, 2014 انت مسوي نافذه؟ تقدر تسوي تريقر يتحقق من انه مسجل الدخول يوم يفتح اللوحه. Link to comment
αвυ-wαleed Posted March 29, 2014 Author Share Posted March 29, 2014 هذا الكلينت local x, y = guiGetScreenSize() SkinMusic = "data/music/SkinSelectMusic.mp3" SkinAnims = {"dnce_M_b","DAN_Left_A","DAN_Down_A","DAN_Loop_A"} StartSkin = 0 NewSkin = false function SelectSkin () setElementInterior ( getLocalPlayer(), 0, 0,0,0 ) setCameraMatrix( 2745.8266601563,-2231.1694335938,62.25520324707, 3999.9999499991,-2607.4000244141,16.1) skin = createPed ( StartSkin, 2749.7502441406,-2232.7170410156,61.727611541748,60 ) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) fadeCamera( true, 10) setTime(0,0) SkinSelectMusic = playSound(SkinMusic,true) bindKey("arrow_r","down",NextSkin) bindKey("arrow_l","down",LastSkin) bindKey(".","down",SpawnPlayer) addEventHandler("onClientRender",getRootElement(),AnnounceSkinJob) showCursor(true) showChat(false) showPlayerHudComponent ( "radar", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() SelectSkin() FreezeBots() end) function SpawnPlayer() local r,g,b = math.random(0,255),math.random(0,255),math.random(0,255) triggerServerEvent ( "onClientWantsToSpawn", getLocalPlayer(), getLocalPlayer(),StartSkin,r,g,b ) unbindKey("arrow_r","down",NextSkin) unbindKey("arrow_l","down",LastSkin) unbindKey("lshift","down",SpawnPlayer) setTime(12,0) stopSound(SkinSelectMusic) removeEventHandler("onClientRender",getRootElement(),AnnounceSkinJob) showCursor(false) showChat(true) showPlayerHudComponent ( "radar", true ) guiSetVisible(lnextskin,false) guiSetVisible(rnextskin,false) guiSetVisible(spawnskin,false) setElementData(getLocalPlayer(),"red",r) setElementData(getLocalPlayer(),"green",g) setElementData(getLocalPlayer(),"blue",b) end function NextSkin() if StartSkin == 312 then StartSkin = -1 elseif StartSkin == 2 then StartSkin = 8 end StartSkin = StartSkin + 1 setElementModel(skin,StartSkin) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) SkinJobTextColor() end function LastSkin() if StartSkin == 0 then StartSkin = 313 elseif StartSkin == 9 then StartSkin = 3 end StartSkin = StartSkin - 1 setElementModel(skin,StartSkin) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) SkinJobTextColor() end lnextskin = guiCreateButton(x-x/1.30,y/1.22,x/5,y/20,"<<<",false) guiSetProperty(lnextskin,"PushedTextColour","FFFFFF00") guiSetFont(lnextskin,"sa-header") rnextskin = guiCreateButton(x-x/2.90,y/1.22,x/5,y/20,">>>",false) guiSetProperty(rnextskin,"PushedTextColour","FFFFFF00") guiSetFont(rnextskin,"sa-header") spawnskin = guiCreateButton(x-x/1.80,y/1.22,x/5,y/20,"Play",false) guiSetProperty(spawnskin,"PushedTextColour","FFFFFF00") guiSetFont(spawnskin,"sa-header") addEventHandler( "onClientGUIClick", getRootElement(), function() if source == lnextskin then LastSkin() elseif source == rnextskin then NextSkin() elseif source == spawnskin then SpawnPlayer() end end) ------PEDS function FreezeBots() local Bots = getElementsByType("ped") for k,v in ipairs(Bots) do setElementFrozen(v,true) end end function loadMansion () outputChatBox("[bem-Vindo Ao Server]", getRootElement(), 255, 0, 0,true ) end addEventHandler("onClientResourceStart", getResourceRootElement(), loadMansion) ابغى وين احطة اللي فوق سيرفر وهذا كلينت 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