khaledmhammed Posted August 27, 2015 Author Share Posted August 27, 2015 lua.85 ")" enpected near "then" Link to comment
iMr.SFA7 Posted August 27, 2015 Share Posted August 27, 2015 lua.85 ")" enpected near "then" الكود كله 75 سطر من وين جات 85 Link to comment
khaledmhammed Posted August 27, 2015 Author Share Posted August 27, 2015 lua.85 ")" enpected near "then" الكود كله 75 سطر من وين جات 85 ض1 بذا السطر بس لني حاط كود فوق صار اكثر ( Acc and not isGuestAccount ( Acc ) then Link to comment
iMr.SFA7 Posted August 27, 2015 Share Posted August 27, 2015 hospitalsTable = { { 1179.22803,-1323.52087,14.15908}, { 1606.85559,1822.30957,10.82031}, { -2659.85767,632.98505,14.45313}, } function spawn() local i=0 local minDistance=100000 local minHospital = 0 local posX, posY, posZ = getElementPosition(source) for key,val in ipairs(hospitalsTable) do i=i+1 local distance = getDistanceBetweenPoints2D(posX, posY, val[1], val[2]) if (distance) then minDistance=distance minHospital=i end end spawnPlayer ( source, hospitalsTable[minHospital][1], hospitalsTable [minHospital][2], hospitalsTable [minHospital][3] ) end addEventHandler("onPlayerWasted", getRootElement(),spawn) addEventHandler("onPlayerLogin", root, function(_, account) if not getAccountData(account, "FirstTime") then outputChatBox("You're playing for the first time!", source, 0, 255, 0) setAccountData(account, "FirstTime", true) else outputChatBox("This is not the first time for you!", source, 255, 0, 0) end end) addEventHandler( "onPlayerQuit", root, function( ) local PlayerAcc = getPlayerAccount ( source ) if ( PlayerAcc and not isGuestAccount ( PlayerAcc ) and getPlayerTeam ( source ) ) then setAccountData ( PlayerAcc, "PlayerTeam", getTeamName ( getPlayerTeam ( source ) )) setAccountData ( PlayerAcc, "skin", getElementModel ( source ) ) end end ) addEventHandler( "onPlayerLogin", root, function ( _,acc ) local SavedTeam_ = getAccountData( acc, "PlayerTeam" ) local skinPlayer = getAccountData( acc, "skin" ) if ( SavedTeam_ ) then setPlayerTeam ( source, getTeamFromName ( SavedTeam_ ) ) outputChatBox ( "* You Joined Team: "..SavedTeam_, source, 0, 255, 0, true ) if ( skinPlayer ) then setElementModel ( source , skinPlayer ) else setElementModel ( source , 0 ) end else setPlayerTeam ( source, getTeamFromName ( "NoTeam" ) ) end end ) addEventHandler ("onPlayerSpawn",root, function ( ) local Acc = getPlayerAccount( source ) if ( Acc and not isGuestAccount ( Acc ) ) then setTimer(setElementModel,500,1,source,getAccountData( Acc, "skin" )) end end ) addEventHandler("onElementModelChange", root, function ( ) if ( getElementType(source) == "player" ) then local Acc = getPlayerAccount ( source ) if ( Acc and not isGuestAccount ( Acc )) then setAccountData ( Acc, "skin", getElementModel ( source ) ) end end end ) Link to comment
khaledmhammed Posted August 27, 2015 Author Share Posted August 27, 2015 عداكك العيب ي شيخ ضبططت وزي العسسل soory تعبتك معي يعطيك الف الف عافية وشكرأأ 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