Wysłany: 2017-07-31, 20:00
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Witam,
Wie mo?e kto? jak przerobi? skrypt na eazy workshop (montowanie MK) tak aby ka?dy gracz m?g? sam sobie zamontowa? nie b?d?c w organizacji Eazy Workshop?
createBlip ( 1309.58 , - 869.64 , 42.65 , 63 )
function getVehicleHandlingProperty ( element , property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable [ property ]
if value then
return value
end
end
return false
end
addEvent ( "mk2" , true )
addEventHandler ( "mk2" , getRootElement (), function()
local hajs = getPlayerMoney ( source )
local ccar = getPedOccupiedVehicle ( source )
if not ccar then outputChatBox ( "Musisz by? w poje?dzie" , source , 255 , 255 , 255 ) return end
if getElementData ( source , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , source , 255 , 255 , 255 ) return end
if hajs < 0 then outputChatBox ( "Nie sta? Ci? na te ulepszenie" , source , 255 , 255 , 255 ) return end
local id = getElementData ( ccar , "vehicle:id" )
if not id then return end
local qr = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND mk2=?" , getElementData ( ccar , "vehicle:id" ), "1" )
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( ccar )
destroyElement ( ccar )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "MONTAZ US2" , id )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET mk2=1 WHERE id=?" , id )
outputChatBox ( "Monta? systemu US2 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni" , source , 255 , 255 , 255 )
takePlayerMoney ( source , 0 )
end )
addEvent ( "mk1" , true )
addEventHandler ( "mk1" , getRootElement (), function()
local hajs = getPlayerMoney ( source )
local ccar = getPedOccupiedVehicle ( source )
if not ccar then outputChatBox ( "Musisz by? w poje?dzie" , source , 255 , 255 , 255 ) return end
if getElementData ( source , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , source , 255 , 255 , 255 ) return end
if hajs < 0 then outputChatBox ( "Nie sta? Ci? na te ulepszenie" , source , 255 , 255 , 255 ) return end
local id = getElementData ( ccar , "vehicle:id" )
if not id then return end
local qr = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND mk1=?" , getElementData ( ccar , "vehicle:id" ), "1" )
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
-- exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET mk1=1 WHERE ownedPlayer=? AND id=?" , getElementData ( source , "player:uid" ), getElementData ( ccar , "vehicle:id" ))
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( ccar )
destroyElement ( ccar )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET mk1=1 WHERE id=?" , id )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "MONTAZ US1" , id )
outputChatBox ( "Monta? systemu US1 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni" , source , 255 , 255 , 255 )
takePlayerMoney ( source , 0 )
end )
addEvent ( "naped" , true )
addEventHandler ( "naped" , getRootElement (), function()
local hajs = getPlayerMoney ( source )
local ccar = getPedOccupiedVehicle ( source )
if not ccar then outputChatBox ( "Musisz by? w poje?dzie" , source , 255 , 255 , 255 ) return end
if getElementData ( source , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , source , 255 , 255 , 255 ) return end
if hajs < 0 then outputChatBox ( "Nie sta? Ci? na te ulepszenie" , source , 255 , 255 , 255 ) return end
local id = getElementData ( ccar , "vehicle:id" )
if not id then return end
local qr = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND naped=?" , getElementData ( ccar , "vehicle:id" ), "1" )
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
-- exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET naped=1 WHERE ownedPlayer=? AND id=?" , getElementData ( source , "player:uid" ), getElementData ( ccar , "vehicle:id" ))
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( ccar )
destroyElement ( ccar )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "MONTAZ NAPEDU" , id )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET naped=1 WHERE id=?" , id )
outputChatBox ( "Monta? nap?du 4x4 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni" , source , 255 , 255 , 255 )
takePlayerMoney ( source , 0 )
end )
neonys = {
[ 'czerwony' ] = 1 ,
[ 'niebieski' ] = 2 ,
[ 'zielony' ] = 3 ,
[ 'zolty' ] = 4 ,
[ 'rozowy' ] = 5 ,
[ 'bialy' ] = 6 ,
[ 'usun' ] = 0 ,
}
maskowanie = {
[ 'polowa' ] = { 1 , 0 },
[ 'caly' ] = { 2 , 0 },
[ 'usun' ] = { false , 0 },
}
addCommandHandler ( "maskorasko" ,function( plr , cmd , tekst )
if getElementData ( plr , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , plr , 255 , 255 , 255 ) return end
if not tekst then outputChatBox ( "/" .. cmd .. "[polowa,caly,usun]" , plr ) return end
if not maskowanie [ tekst ] then outputChatBox ( "/" .. cmd .. "[polowa,caly,usun]" , plr ) return end
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "NO ALE k**** PANIE NA DUPE CI TEGO NIE ZAMONTUJE PROSZE WYDUPCZAC STAD NATYCHIAMST" , plr ) return end
if getPlayerMoney ( plr ) < maskowanie [ tekst ][ 2 ] then outputChatBox ( "* Nie masz pienionzkow" , plr ) return end
takePlayerMoney ( plr , maskowanie [ tekst ][ 2 ])
setElementData ( veh , "vehicle:masked" , false )
setTimer ( setElementData , 200 , 1 , veh , "vehicle:masked" , maskowanie [ tekst ][ 1 ])
outputChatBox (( "* ZAMONOTWALES WKYKRUWIONE PANIE JAK TALAL ULBUONE TWOJE MASKOWANIE TO %s" ): format ( tekst ), plr )
end )
addCommandHandler ( "neonys" ,function( plr , cmd , tekst )
if getElementData ( plr , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , plr , 255 , 255 , 255 ) return end
if not tekst then outputChatBox ( "/" .. cmd .. "[czerwony,niebieski,zielony,zolty,rozowy,bialy,usun]" , plr ) return end
if not neonys [ tekst ] then outputChatBox ( "/" .. cmd .. "[czerwony,niebieski,zielony,zolty,rozowy,bialy,usun]" , plr ) return end
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "NO ALE k**** PANIE NA DUPE CI TEGO NIE ZAMONTUJE PROSZE WYDUPCZAC STAD NATYCHIAMST" , plr ) return end
setElementData ( veh , "neony" , neonys [ tekst ])
outputChatBox (( "* ZAMONOTWALES WKYKRUWIONE PANIE JAK TALAL ULBUONE TWOJE PERFEKCYJE DUPERELE KOLORU %s" ): format ( tekst ), plr )
end )
addCommandHandler ( "*****" ,function( plr , cmd )
if getElementData ( plr , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , plr , 255 , 255 , 255 ) return end
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "/k*** w pojezdzie a nie k**** na dupie !" , plr ) return end
local x = getVehicleUpgradeOnSlot ( veh , 8 )
if x == 1010 then
removeVehicleUpgrade ( veh , 1010 )
else
addVehicleUpgrade ( veh , 1010 )
end
outputChatBox ( "UZYLES ZAJEBISTEJ KOMENDY ZIEMNIAKU" , plr )
end )
addCommandHandler ( "zajebmaske" ,function( plr , cmd )
if getElementData ( plr , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , plr , 255 , 255 , 255 ) return end
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "Nie siedzisz w poje?dzie :)" , plr , 255 , 0 , 0 ) return end
local cena = 0
local id = getElementData ( veh , "vehicle:id" )
if not id then return end
local query = exports [ 'ogrpg-db' ]: dbGet ( "SELECT removehood from ogrpg_vehicles where id=?" , id )
if query and #query > 0 then
local status = tonumber ( query [ 1 ]. removehood )
if status == 0 then
if getPlayerMoney ( plr ) < cena then outputChatBox ( "** Nie masz kwoty!" , plr , 255 , 0 , 0 ) return end
outputChatBox ( "**Zdemontowa?e? mask? w pojezdzie zabrano " .. cena .. " PLN" , plr , 255 , 0 , 0 )
takePlayerMoney ( plr , cena )
setElementData ( veh , "vehicle:bonnet" , true )
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set removehood=1 where id=?" , id )
elseif status == 1 then
setElementData ( veh , "vehicle:bonnet" , false )
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set removehood=0 where id=?" , id )
end
end
end )
addCommandHandler ( "gwintowka" ,function( plr , cmd )
if getElementData ( plr , "player:organization" ) ~= "Eazy Workshop" then outputChatBox ( "Nie nale?ysz do organizacji Eazy Workshop" , plr , 255 , 255 , 255 ) return end
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "NIE JESTE? W POJE?DZIE ?YSY CWELU!" , plr , 255 , 0 , 0 ) return end
local cena = 0
id = getElementData ( veh , "vehicle:id" )
if not id then outputChatBox ( "BAO BAO CI? CWELU" , plr , 255 , 0 , 0 ) return end
local query = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND rh=?" , getElementData ( veh , "vehicle:id" ), "1" )
if query then
if #query == 0 then
if getPlayerMoney ( plr ) < cena then outputChatBox ( "NIE MASZ TYLE HAJSU G?UPIA SZMATO! (18500 PLN)" , plr , 255 , 0 , 0 ) return end
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set rh=1 where id=?" , id )
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( veh )
destroyElement ( veh )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "Montaz GZ" , id )
outputChatBox ( "Pojazd zosta? przeniesiony do przechowywalni, GZ ZAMONTOWANE DO ****!" , plr , 255 , 0 , 0 )
takePlayerMoney ( plr , cena )
elseif #query == 1 then
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set rh=0 where id=?" , id )
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( veh )
destroyElement ( veh )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "DEMONTAZ GZ" , id )
givePlayerMoney ( plr , math . floor ( cena / 2 ))
outputChatBox ( "Pojazd zosta? przeniesiony do przechowywalni, GZ ZDEMONTOWANE DO ****! DOSTAJESZ " .. math . floor ( cena / 2 ).. "" , plr , 255 , 0 , 0 )
end
end
end )
addCommandHandler ( "k***?" ,function( plr , cmd )
if ( isGarageOpen ( 24 )) then
-- close the door
setGarageOpen ( 24 , false )
return
end
setGarageOpen ( 24 , true )
end )
addCommandHandler ( "lickaaa" ,function( plr , cmd )
if ( isGarageOpen ( 8 )) then
-- close the door
setGarageOpen ( 8 , false )
return
end
setGarageOpen ( 8 , true )
end )
Tak wygl?da po stronie servera.
Wysłany: 2017-07-31, 20:16
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4700 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
Prosz...
createBlip ( 1309.58 , - 869.64 , 42.65 , 63 )
function getVehicleHandlingProperty ( element , property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable [ property ]
if value then
return value
end
end
return false
end
addEvent ( "mk2" , true )
addEventHandler ( "mk2" , getRootElement (), function()
local hajs = getPlayerMoney ( source )
local ccar = getPedOccupiedVehicle ( source )
if not ccar then outputChatBox ( "Musisz by? w poje?dzie" , source , 255 , 255 , 255 ) return end
if hajs < 0 then outputChatBox ( "Nie sta? Ci? na te ulepszenie" , source , 255 , 255 , 255 ) return end
local id = getElementData ( ccar , "vehicle:id" )
if not id then return end
local qr = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND mk2=?" , getElementData ( ccar , "vehicle:id" ), "1" )
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( ccar )
destroyElement ( ccar )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "MONTAZ US2" , id )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET mk2=1 WHERE id=?" , id )
outputChatBox ( "Monta? systemu US2 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni" , source , 255 , 255 , 255 )
takePlayerMoney ( source , 0 )
end )
addEvent ( "mk1" , true )
addEventHandler ( "mk1" , getRootElement (), function()
local hajs = getPlayerMoney ( source )
local ccar = getPedOccupiedVehicle ( source )
if not ccar then outputChatBox ( "Musisz by? w poje?dzie" , source , 255 , 255 , 255 ) return end
if hajs < 0 then outputChatBox ( "Nie sta? Ci? na te ulepszenie" , source , 255 , 255 , 255 ) return end
local id = getElementData ( ccar , "vehicle:id" )
if not id then return end
local qr = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND mk1=?" , getElementData ( ccar , "vehicle:id" ), "1" )
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
-- exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET mk1=1 WHERE ownedPlayer=? AND id=?" , getElementData ( source , "player:uid" ), getElementData ( ccar , "vehicle:id" ))
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( ccar )
destroyElement ( ccar )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET mk1=1 WHERE id=?" , id )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "MONTAZ US1" , id )
outputChatBox ( "Monta? systemu US1 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni" , source , 255 , 255 , 255 )
takePlayerMoney ( source , 0 )
end )
addEvent ( "naped" , true )
addEventHandler ( "naped" , getRootElement (), function()
local hajs = getPlayerMoney ( source )
local ccar = getPedOccupiedVehicle ( source )
if not ccar then outputChatBox ( "Musisz by? w poje?dzie" , source , 255 , 255 , 255 ) return end
if hajs < 0 then outputChatBox ( "Nie sta? Ci? na te ulepszenie" , source , 255 , 255 , 255 ) return end
local id = getElementData ( ccar , "vehicle:id" )
if not id then return end
local qr = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND naped=?" , getElementData ( ccar , "vehicle:id" ), "1" )
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
-- exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET naped=1 WHERE ownedPlayer=? AND id=?" , getElementData ( source , "player:uid" ), getElementData ( ccar , "vehicle:id" ))
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( ccar )
destroyElement ( ccar )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "MONTAZ NAPEDU" , id )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET naped=1 WHERE id=?" , id )
outputChatBox ( "Monta? nap?du 4x4 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni" , source , 255 , 255 , 255 )
takePlayerMoney ( source , 0 )
end )
neonys = {
[ 'czerwony' ] = 1 ,
[ 'niebieski' ] = 2 ,
[ 'zielony' ] = 3 ,
[ 'zolty' ] = 4 ,
[ 'rozowy' ] = 5 ,
[ 'bialy' ] = 6 ,
[ 'usun' ] = 0 ,
}
maskowanie = {
[ 'polowa' ] = { 1 , 0 },
[ 'caly' ] = { 2 , 0 },
[ 'usun' ] = { false , 0 },
}
addCommandHandler ( "maskorasko" ,function( plr , cmd , tekst )
if not tekst then outputChatBox ( "/" .. cmd .. "[polowa,caly,usun]" , plr ) return end
if not maskowanie [ tekst ] then outputChatBox ( "/" .. cmd .. "[polowa,caly,usun]" , plr ) return end
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "NO ALE k**** PANIE NA DUPE CI TEGO NIE ZAMONTUJE PROSZE WYDUPCZAC STAD NATYCHIAMST" , plr ) return end
if getPlayerMoney ( plr ) < maskowanie [ tekst ][ 2 ] then outputChatBox ( "* Nie masz pienionzkow" , plr ) return end
takePlayerMoney ( plr , maskowanie [ tekst ][ 2 ])
setElementData ( veh , "vehicle:masked" , false )
setTimer ( setElementData , 200 , 1 , veh , "vehicle:masked" , maskowanie [ tekst ][ 1 ])
outputChatBox (( "* ZAMONOTWALES WKYKRUWIONE PANIE JAK TALAL ULBUONE TWOJE MASKOWANIE TO %s" ): format ( tekst ), plr )
end )
addCommandHandler ( "neonys" ,function( plr , cmd , tekst )
if not tekst then outputChatBox ( "/" .. cmd .. "[czerwony,niebieski,zielony,zolty,rozowy,bialy,usun]" , plr ) return end
if not neonys [ tekst ] then outputChatBox ( "/" .. cmd .. "[czerwony,niebieski,zielony,zolty,rozowy,bialy,usun]" , plr ) return end
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "NO ALE k**** PANIE NA DUPE CI TEGO NIE ZAMONTUJE PROSZE WYDUPCZAC STAD NATYCHIAMST" , plr ) return end
setElementData ( veh , "neony" , neonys [ tekst ])
outputChatBox (( "* ZAMONOTWALES WKYKRUWIONE PANIE JAK TALAL ULBUONE TWOJE PERFEKCYJE DUPERELE KOLORU %s" ): format ( tekst ), plr )
end )
addCommandHandler ( "je*****" ,function( plr , cmd )
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "/k*** w pojezdzie a nie k**** na dupie !" , plr ) return end
local x = getVehicleUpgradeOnSlot ( veh , 8 )
if x == 1010 then
removeVehicleUpgrade ( veh , 1010 )
else
addVehicleUpgrade ( veh , 1010 )
end
outputChatBox ( "UZYLES je***** KOMENDY ZIEMNIAKU" , plr )
end )
addCommandHandler ( "je*****" ,function( plr , cmd )
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "Nie siedzisz w poje?dzie :)" , plr , 255 , 0 , 0 ) return end
local cena = 0
local id = getElementData ( veh , "vehicle:id" )
if not id then return end
local query = exports [ 'ogrpg-db' ]: dbGet ( "SELECT removehood from ogrpg_vehicles where id=?" , id )
if query and #query > 0 then
local status = tonumber ( query [ 1 ]. removehood )
if status == 0 then
if getPlayerMoney ( plr ) < cena then outputChatBox ( "** Nie masz kwoty!" , plr , 255 , 0 , 0 ) return end
outputChatBox ( "**Zdemontowa?e? mask? w pojezdzie zabrano " .. cena .. " PLN" , plr , 255 , 0 , 0 )
takePlayerMoney ( plr , cena )
setElementData ( veh , "vehicle:bonnet" , true )
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set removehood=1 where id=?" , id )
elseif status == 1 then
setElementData ( veh , "vehicle:bonnet" , false )
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set removehood=0 where id=?" , id )
end
end
end )
addCommandHandler ( "gwintowka" ,function( plr , cmd )
local veh = getPedOccupiedVehicle ( plr )
if not veh then outputChatBox ( "NIE JESTE? W POJE?DZIE ?YSY CWELU!" , plr , 255 , 0 , 0 ) return end
local cena = 0
id = getElementData ( veh , "vehicle:id" )
if not id then outputChatBox ( "BAO BAO CI? CWELU" , plr , 255 , 0 , 0 ) return end
local query = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND rh=?" , getElementData ( veh , "vehicle:id" ), "1" )
if query then
if #query == 0 then
if getPlayerMoney ( plr ) < cena then outputChatBox ( "NIE MASZ TYLE HAJSU G?UPIA SZMATO! (18500 PLN)" , plr , 255 , 0 , 0 ) return end
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set rh=1 where id=?" , id )
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( veh )
destroyElement ( veh )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "Montaz GZ" , id )
outputChatBox ( "Pojazd zosta? przeniesiony do przechowywalni, GZ ZAMONTOWANE DO ****!" , plr , 255 , 0 , 0 )
takePlayerMoney ( plr , cena )
elseif #query == 1 then
exports [ 'ogrpg-db' ]: dbSet ( "UPDATE ogrpg_vehicles set rh=0 where id=?" , id )
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( veh )
destroyElement ( veh )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "DEMONTAZ GZ" , id )
givePlayerMoney ( plr , math . floor ( cena / 2 ))
outputChatBox ( "Pojazd zosta? przeniesiony do przechowywalni, GZ ZDEMONTOWANE DO ****! DOSTAJESZ " .. math . floor ( cena / 2 ).. "" , plr , 255 , 0 , 0 )
end
end
end )
addCommandHandler ( "k***?" ,function( plr , cmd )
if ( isGarageOpen ( 24 )) then
-- close the door
setGarageOpen ( 24 , false )
return
end
setGarageOpen ( 24 , true )
end )
addCommandHandler ( "lickaaa" ,function( plr , cmd )
if ( isGarageOpen ( 8 )) then
-- close the door
setGarageOpen ( 8 , false )
return
end
setGarageOpen ( 8 , true )
end )
Wysłany: 2017-08-01, 08:35
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Niestety nie dzia?a Pisze: Nie nale?ysz do Organizacji EazyWorkshop
Wysłany: 2017-08-01, 12:46
DylemaT929
Nikt
Wiek: 28 Na forum: 4041 dni Posty: 333
Nick w MP: dylemat929
Piwa : 3195
[code]if getElementData(el, "player:organization") ~= "Eazy Workshop" then outputChatBox("Nie nale?ysz do organizacji FapTeam Shop", 255, 255, 255) return end[/code]
po stronie clienta jeszcze masz ;d
Tagi: eazy :: workshop
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: