مرحبا كيفكم
الزر ما يضغط هنا وش الحل
--------------------------- Server Side ------------------------------------
addEvent("getPing",true)
addEventHandler("getPing",root,
function()
local ip=getPlayerIP(client)
triggerClientEvent(client,"settingText",client,ip)
end)
addEvent("getIP",true)
addEventHandler("getIP",root,
function()
local ip=getPlayerIP(client)
triggerClientEvent(client,"settingText",client,ip)
end)
addEvent("getplayerskin",true)
addEventHandler("getplayerskin",root,
function()
local ip=getplayerskin(client)
triggerClientEvent(client,"settingText",client,ip)
end)
local rootElement = getRootElement()
function qq()
local playername = getPlayerName ( source )
if isPedInVehicle(source) then
if ( getPlayerMoney (source) >= 3000 ) then
takePlayerMoney(source, 3000)
addVehicleUpgrade(getPedOccupiedVehicle(source),1010)
outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFNitro #ffffff] ", source, 255, 20, 50, true)
else
outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true)
end
else
outputChatBox("You are not in a vehicle", source, 25, 200, 200, true)
end
end
addEvent("buyNitro", true)
addEventHandler( "buyNitro",getRootElement(),qq )
function fix()
local playername = getPlayerName ( source )
if isPedInVehicle(source) then
if ( getPlayerMoney (source) >= 3000 ) then
takePlayerMoney(source, 3000)
fixVehicle(getPedOccupiedVehicle(source))
outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFRepair #ffffff] ", source, 255, 255, 0, true)
else
outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true)
end
else
outputChatBox("You are not in a vehicle", source, 255, 50, 200, true)
end
end
addEvent("buyRepair", true)
addEventHandler( "buyRepair",getRootElement(),fix )
function flip()
local playername = getPlayerName ( source )
if isPedInVehicle(source) then
if ( getPlayerMoney (source) >= 3000 ) then
takePlayerMoney(source, 3000)
rx, ry, rz = getVehicleRotation (getPedOccupiedVehicle(source))
setVehicleRotation (getPedOccupiedVehicle(source), rx +180, ry, rz +180)
outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFflip #ffffff] ", source, 255, 255, 0, true)
else
outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true)
end
else
outputChatBox("You are not in a vehicle", source, 255, 0, 200, true)
end
end
addEvent("buyFlip", true)
addEventHandler( "buyFlip",getRootElement(),flip )
addEvent("buyInvisible", true)
addEventHandler("buyInvisible", rootElement,
function()
if ( getPlayerMoney (source) >= 15000 ) then
takePlayerMoney(source, 15000)
outputChatBox("#ffffff[#ffffff #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFInvisible #ffffff]", source, 255, 255, 0, true)
setElementAlpha(getPedOccupiedVehicle(source),0)
setElementAlpha(source,0)
setPlayerNametagShowing(source, false)
setTimer( setElementAlpha, 60000, 1, source, 500, true)
setTimer( setElementAlpha, 60000, 1, getPedOccupiedVehicle(source), 500, true)
setTimer( setPlayerNametagShowing, 60000, 1, source, true, true)
else
outputChatBox("You Dont Have [ #f0000015,000 #ffffff]", source, 255, 255, 255, true)
end
end
)
addCommandHandler ( "buy",
function ( player, cmd, what )
if what == "nitro" then
if getPlayerMoney ( player ) >= 3000 then
if isPedInVehicle ( player ) then
takePlayerMoney ( player, 3000 )
addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 )
outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00Nitro #007fff]", root, 255, 255, 255, true )
else
outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true )
end
else
outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )
end
end
end
)
addCommandHandler ( "buy",
function ( player, cmd, what )
if what == "flip" then
if getPlayerMoney ( player ) >= 3000 then
if isPedInVehicle ( player ) then
takePlayerMoney ( player, 3000 )
addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 )
outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. "#1E90FF has bought a #ffffff[ #1E90FFflip #ffffff] ", root, 255, 255, 255, true )
else
outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true )
end
else
outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )
end
end
end
)
addCommandHandler ( "buy",
function ( player, cmd, what )
if what == "repair" then
if getPlayerMoney ( player ) >= 3000 then
if isPedInVehicle ( player ) then
takePlayerMoney ( player, 3000 )
addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 )
outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00repair #007fff]", root, 255, 255, 255, true )
else
outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true )
end
else
outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )
end
end
end
)
addCommandHandler ( "buy",
function ( player, cmd, what )
if what == "invisible" then
if getPlayerMoney ( player ) >= 3000 then
if isPedInVehicle ( player ) then
takePlayerMoney ( player, 3000 )
addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 )
outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00invisible #007fff]", root, 255, 255, 255, true )
else
outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true )
end
else
outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )
end
end
end
)