Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-01-25, 12:57


Zagmatfany







Wiek: 31
Na forum: 3784 dni
Posty: 8
Nick w MP: Zagmatfany



Respekt: 50

Sprawa wyglada tak ze mam kilka skryptow ktore mialem na starej wersji mta, a na tej jakos nie chca za bardzo chodzic gdy chce go zalaczyc to w konsoli serwera pokazuje ze resources nazwa failed, nie wiem moze to przez wersje multi czy cos nie mam pojecia, ale skrypty na wersji 1.0 czy tam 1.1 dzialaly, ktos moglby mi z tym pomoc?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-25, 14:15


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Podaj dok?adny b??d z db3. Jako ss czy linijka kodu w znacznikach [.code]tekst[/.code] (bez kropek).

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-25, 14:29


Zagmatfany







Wiek: 31
Na forum: 3784 dni
Posty: 8
Nick w MP: Zagmatfany



Respekt: 50

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-25, 14:31


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Popr?buj wpisywa? w konsoli fraz? "upgrade nazwa_zasobu", gdzie "upgrade" to komenda, a "nazwa_zasobu" to nazwa skryptu, kt?ra wywala Ci ten b??d.

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-25, 14:46


Zagmatfany







Wiek: 31
Na forum: 3784 dni
Posty: 8
Nick w MP: Zagmatfany



Respekt: 50

Dobra ogarnalem to, brakowalo kilku plikow, teraz mam kolejne pytanie

mam statystyki na /st zlicza mi przegrane mapy i wygrane tylko problem jest taki ze chcialbym zeby zliczal mi to dopiero gdy bedzie min 2 osoby na serwerze zeby jakbym byl sam nic nie naliczal

i jeszcze jedno jest mozliwosc zrobienia osobno wygrane DD, DM i race zrobic?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-25, 14:47


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Podaj kod na te statystyki.

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-26, 11:27


Zagmatfany







Wiek: 31
Na forum: 3784 dni
Posty: 8
Nick w MP: Zagmatfany



Respekt: 50

Chyba o to chodzi?

Kod:

local rootElement= getRootElement()
addEvent("onMapStarting")
addEvent("onPlayerPickupRacePickup")
addEvent("onPlayerReachCheckpoint")
addEvent("onPlayerRaceWasted")
addEvent("onPlayerFinish")
addEvent("onRaceStateChanging")

function ResourceStart()
executeSQLCreateTable("RaceWins", "serial STRING,RaceWins INT,RaceWins2 INT,RaceWins3 INT,RaceWins4 INT")
executeSQLCreateTable("RaceAttempts", "serial STRING,RaceAttempts INT")
executeSQLCreateTable("DDDM", "serial STRING,DDAttempts INT, DDWins INT")
executeSQLCreateTable("SpinsRolls", "serial STRING,Spins INT,Rolls INT")
executeSQLCreateTable("Colors", "serial STRING,Ccolor STRING,Ncolor STRING")
executeSQLCreateTable("LColors", "serial STRING,R INT,G INT,B INT")
executeSQLCreateTable("VColors", "serial STRING,Col1 INT,Col2 INT,Col3 INT,Col4 INT")
executeSQLCreateTable("PersonalInfo", "serial STRING,Edit1 TEXT,Edit2 TEXT,Edit3 STRING,Edit4 TEXT,Edit5 TEXT,Edit6 STRING,Edit7 TEXT,Edit8 TEXT,Edit9 TEXT,Edit10 TEXT,Edit11 TEXT,Edit12 TEXT,Edit13 TEXT,Edit14 TEXT,Edit15 TEXT,Edit16 TEXT,Edit17 TEXT,Edit18 TEXT")
executeSQLCreateTable("MoneyB", "serial STRING,Money INT,B INT")
executeSQLCreateTable("GmBlockList", "serial STRING")
end
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), ResourceStart)

function ClientReady(g_player)
local serial = getPlayerSerial(g_player)
local playername = getPlayerName(g_player)
local defaultvCol = get("defaultvehiclecolor")
local defaultcCol = get("defaultchatcolor")
local defaultnCol = get("defaultnamecolor")
CheckPlayer = executeSQLSelect ( "RaceWins", "serial", "serial = '" .. serial .. "'" )
CheckPlayer2 = executeSQLSelect ( "SpinsRolls", "serial", "serial = '" .. serial .. "'" )
CheckPlayer4 = executeSQLSelect ( "MoneyB", "serial", "serial = '" .. serial .. "'" )
CheckPlayer5 = executeSQLSelect ( "PersonalInfo", "serial", "serial = '" .. serial .. "'" )
CheckPlayer6 = executeSQLSelect ( "VColors", "serial", "serial = '" .. serial .. "'" )
CheckPlayer7 = executeSQLSelect ( "LColors", "serial", "serial = '" .. serial .. "'" )
CheckPlayer8 = executeSQLSelect ( "Colors", "serial", "serial = '" .. serial .. "'" )
CheckPlayer9 = executeSQLSelect ( "RaceAttempts", "serial", "serial = '" .. serial .. "'" )
CheckPlayer10= executeSQLSelect ( "DDDM", "serial", "serial = '" .. serial .. "'" )

if ( type( CheckPlayer ) == "table" and #CheckPlayer == 0 ) or not CheckPlayer then
executeSQLInsert ( "RaceWins", "'"..serial.."','0','0','0','0'" )
end

if ( type( CheckPlayer2 ) == "table" and #CheckPlayer2 == 0 ) or not CheckPlayer2 then
executeSQLInsert ( "SpinsRolls", "'"..serial.."','0','0'" )
end

if ( type( CheckPlayer4 ) == "table" and #CheckPlayer4 == 0 ) or not CheckPlayer4 then
executeSQLInsert ( "MoneyB", "'"..serial.."','0','0'" )
end

if ( type( CheckPlayer5 ) == "table" and #CheckPlayer5 == 0 ) or not CheckPlayer5 then
executeSQLInsert ( "PersonalInfo", "'"..serial.."','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','0:0:0','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-','-NONE-'" )
end

if ( type( CheckPlayer6 ) == "table" and #CheckPlayer6 == 0 ) or not CheckPlayer6 then
executeSQLInsert ( "VColors", "'"..serial.."','"..defaultvCol.."','"..defaultvCol.."','"..defaultvCol.."','"..defaultvCol.."'" )
end

if ( type( CheckPlayer7 ) == "table" and #CheckPlayer7 == 0 ) or not CheckPlayer7 then
executeSQLInsert ( "LColors", "'"..serial.."','255','255','255'" )
end

if ( type( CheckPlayer8 ) == "table" and #CheckPlayer8 == 0 ) or not CheckPlayer8 then
executeSQLInsert ( "Colors", "'"..serial.."','"..defaultcCol.."','"..defaultnCol.."'" )
end

if ( type( CheckPlayer9 ) == "table" and #CheckPlayer9 == 0 ) or not CheckPlayer9 then
executeSQLInsert ( "RaceAttempts", "'"..serial.."','0'" )
end

if ( type( CheckPlayer10 ) == "table" and #CheckPlayer10 == 0 ) or not CheckPlayer10 then
executeSQLInsert ( "DDDM", "'"..serial.."','0','0'" )
end
local serial = getPlayerSerial(source)
local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'")
setElementData(source, "Money", tonumber(Money[1]["Money"]))
local Namecolor = executeSQLSelect ( "Colors", "Ncolor","serial = '" .. serial .. "'")
local ChatColor = executeSQLSelect ( "Colors", "Ccolor","serial = '" .. serial .. "'")
setElementData ( source ,"info.namecolor",Namecolor[1]["Ncolor"],true)
setElementData ( source ,"info.chatcolor",ChatColor[1]["Ccolor"],true)
end
addEvent("onClientReady",true)
addEventHandler("onClientReady",getRootElement(),ClientReady)

function raceWin(rank)
if rank ~= 1 then --Check if the player's rank is 1
return
end
local playername = getPlayerName(source)
local serial = getPlayerSerial(source)
local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'")
local Wins1 = executeSQLSelect ( "RaceWins", "RaceWins","serial = '" .. serial .. "'")

Money = tonumber(Money[1]["Money"]) + get('MoneyForTheFirst')
triggerClientEvent (source,"onPlayerWin", getRootElement())
setElementData (source, "Money" ,Money)
setElementData ( source ,"data.money",Money,true)
executeSQLUpdate ( "MoneyB", "Money = '"..Money.."'","serial = '" .. serial .. "'")
outputChatBox("*Win: "..playername.." took $"..get('MoneyForTheFirst').." for finishing first!",getRootElement(),255,153,0)
setElementData(source,"data.playername",playername,true)

Wins1 = tonumber(Wins1[1]["RaceWins"]) + 1
setElementData ( source ,"race.Wins",Wins1,true)
end



function raceSec(rank)
if rank ~= 2 then
return
end
local playername = getPlayerName(source)
local serial = getPlayerSerial(source)
local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'")
local Wins2 = executeSQLSelect ( "RaceWins", "RaceWins2","serial = '" .. serial .. "'")

Money = tonumber(Money[1]["Money"]) + get('MoneyForTheSecond')
outputChatBox("*Win: "..playername.." took $"..get('MoneyForTheSecond').." for finishing second!",getRootElement(),255,153,0)
triggerClientEvent (source,"onPlayerWin2", getRootElement())
setElementData(source, "Money", Money)
setElementData ( source ,"data.money",Money,true)
setElementData(source,"data.playername",playername,true)

Wins2 = tonumber(Wins2[1]["RaceWins2"]) + 1
setElementData ( source ,"race.Wins2",Wins2,true)

executeSQLUpdate ( "MoneyB", "Money = '"..Money.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "RaceWins", "RaceWins2 = '"..Wins2.."'","serial = '" .. serial .. "'")
end
addEventHandler( "onPlayerFinish", rootElement, raceSec ) -- Race Wins

function raceTh(rank)
if rank ~= 3 then
return
end
local playername = getPlayerName(source)
local serial = getPlayerSerial(source)
local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'")
local Wins3 = executeSQLSelect ( "RaceWins", "RaceWins3","serial = '" .. serial .. "'")

Money = tonumber(Money[1]["Money"]) + get('MoneyForTheThird')
outputChatBox("*Win: "..playername.." took $"..get('MoneyForTheThird').." for finishing third!",getRootElement(),255,153,0)
triggerClientEvent (source,"onPlayerWin3", getRootElement())
setElementData(source, "Money", Money)
setElementData ( source ,"data.money",Money,true)
setElementData(source,"data.playername",playername,true)

Wins3 = tonumber(Wins3[1]["RaceWins3"]) + 1
setElementData ( source ,"race.Wins3",Wins3,true)

executeSQLUpdate ( "MoneyB", "Money = '"..Money.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "RaceWins", "RaceWins3 = '"..Wins3.."'","serial = '" .. serial .. "'")
end
addEventHandler( "onPlayerFinish", rootElement, raceTh ) -- Race Wins

function raceAny(rank)
if rank < 4 then
return
end
local playername = getPlayerName(source)
local serial = getPlayerSerial(source)
local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'")
local Wins4 = executeSQLSelect ( "RaceWins", "RaceWins4","serial = '" .. serial .. "'")

Money = tonumber(Money[1]["Money"]) + get('MoneyFor>Third')
outputChatBox("*Win: "..playername.." took $"..get('MoneyFor>Third').." for completing the race!",getRootElement(),255,153,0)
triggerClientEvent (source,"onPlayerWino", getRootElement())

setElementData(source, "Money", Money)
setElementData ( source ,"data.money",Money,true)
setElementData(source,"data.playername",playername,true)

Wins4 = Wins4[1]["RaceWins4"] + 1
setElementData ( source ,"race.Wins4",Wins4,true)

executeSQLUpdate ( "MoneyB", "Money = '"..Money.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "RaceWins", "RaceWins4 = '"..Wins4.."'","serial = '" .. serial .. "'")
end
addEventHandler( "onPlayerFinish", rootElement, raceAny ) -- Race Wins

function DestructionMoney(mapInfo,mapOptions,gameOptions)
info = mapInfo.modename
if mapInfo.modename == "Destruction derby" then
local players = getElementsByType("player")
for k,v in ipairs(players) do
local serial = getPlayerSerial(v)
local playername = getPlayerName(v)
local DDAttempts = executeSQLSelect ( "DDDM", "DDAttempts","serial = '" .. serial .. "'")
DDAttempts = tonumber(DDAttempts[1]["DDAttempts"]) + 1
if DDAttempts == 100 or DDAttempts == 200 or DDAttempts == 300 or DDAttempts == 400 or DDAttempts == 500 or DDAttempts == 600 or DDAttempts == 700 or DDAttempts == 800 or DDAttempts == 900 or DDAttempts == 1000 or DDAttempts == 1100 or DDAttempts == 1200 or DDAttempts == 1300 or DDAttempts == 1400 or DDAttempts == 1500 or DDAttempts == 1600 or DDAttempts == 1700 or DDAttempts == 1800 or DDAttempts == 1900 or DDAttempts == 2000 or DDAttempts == 2100 or DDAttempts == 2200 or DDAttempts == 2300 or DDAttempts == 2400 or DDAttempts == 2500 or DDAttempts == 2600 or DDAttempts == 2700 or DDAttempts == 2800 or DDAttempts == 2900 or DDAttempts == 3000 or DDAttempts == 3100 or DDAttempts == 3200 or DDAttempts == 3300 or DDAttempts == 3400 or DDAttempts == 3500 or DDAttempts == 3600 or DDAttempts == 3700 or DDAttempts == 3800 or DDAttempts == 3900 or DDAttempts == 4000 or DDAttempts == 4100 or DDAttempts == 4200 or DDAttempts == 4300 or DDAttempts == 4400 or DDAttempts == 4500 or DDAttempts == 4600 or DDAttempts == 4700 or DDAttempts == 4800 or DDAttempts == 4900 or DDAttempts == 5000 or DDAttempts == 5100 or DDAttempts == 5200 or DDAttempts == 5300 or DDAttempts == 5400 or DDAttempts == 5500 or DDAttempts == 5600 or DDAttempts == 5700 or DDAttempts == 5800 or DDAttempts == 5900 or DDAttempts == 6000 or DDAttempts == 6100 or DDAttempts == 6200 or DDAttempts == 6300 or DDAttempts == 6400 or DDAttempts == 6500 or DDAttempts == 6600 or DDAttempts == 6700 or DDAttempts == 6800 or DDAttempts == 6900 or DDAttempts == 7000 or DDAttempts == 7100 or DDAttempts == 7200 or DDAttempts == 7300 or DDAttempts == 7400 or DDAttempts == 7500 or DDAttempts == 7600 or DDAttempts == 7700 or DDAttempts == 7800 or DDAttempts == 7900 or DDAttempts == 8000 then
outputChatBox(playername.." wins $"..get('BonusForDD').." for playing "..DDAttempts.." DDs/DMs!",getRootElement(),255,255,0)
local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'")
Money = tonumber(Money[1]["Money"]) + get('BonusForDD')
executeSQLUpdate ( "MoneyB", "Money = '"..Money.."'","serial = '" .. serial .. "'")
end
executeSQLUpdate ( "DDDM", "DDAttempts = '"..DDAttempts.."'","serial = '" .. serial .. "'")
setElementData(v,"data.DDAttempts",DDAttempts,true)
end
end
end

function DestructionMoney2(thePlayer)
local playername = getPlayerName(thePlayer)
local serial = getPlayerSerial(thePlayer)
local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'")
local DDWins = executeSQLSelect( "DDDM", "DDWins","serial = '" .. serial .. "'")

outputChatBox(playername.." wins $"..get('MoneyForDD').." for surviving!",getRootElement(),255,255,0)

Money = tonumber(Money[1]["Money"]) + get('MoneyForDD')
DDWinss = tonumber(DDWins[1]["DDWins"]) + 1
if DDWinss == 100 or DDWinss == 200 or DDWinss == 300 or DDWinss == 400 or DDWinss == 500 or DDWinss == 600 or DDWinss == 700 or DDWinss == 800 or DDWinss == 900 or DDWinss == 1000 or DDWinss == 1100 or DDWinss == 1200 or DDWinss == 1300 or DDWinss == 1400 or DDWinss == 1500 or DDWinss == 1600 or DDWinss == 1700 or DDWinss == 1800 or DDWinss == 1900 or DDWinss == 2000 or DDWinss == 2100 or DDWinss == 2200 or DDWinss == 2300 or DDWinss == 2400 or DDWinss == 2500 or DDWinss == 2600 or DDWinss == 2700 or DDWinss == 2800 or DDWinss == 2900 or DDWinss == 3000 or DDWinss == 3100 or DDWinss == 3200 or DDWinss == 3300 or DDWinss == 3400 or DDWinss == 3500 or DDWinss == 3600 or DDWinss == 3700 or DDWinss == 3800 or DDWinss == 3900 or DDWinss == 4000 then
outputChatBox(playername.." wins $"..get('BonusForWinDD').." for winning "..DDWinss.." DDs/DMs!",getRootElement(),255,255,0)
Money = Money + get('BonusForWinDD')
end
setElementData(thePlayer ,"Money", Money)
setElementData(thePlayer ,"data.money",Money,true)
setElementData(thePlayer ,"data.playername",playername,true)
setElementData(thePlayer ,"data.DDWins",DDWinss,true)

executeSQLUpdate ( "MoneyB", "Money = '"..Money.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "DDDM", "DDWins = '"..DDWinss.."'","serial = '" .. serial .. "'")
triggerClientEvent(thePlayer,"onPlayerWinD", getRootElement())
end




function RespawnTime(mapInfo,mapOptions)
mapinfo = mapInfo.modename
respawntime = mapOptions.respawntime
end
addEventHandler("onMapStarting",getRootElement(),RespawnTime)

function respawnColor()
if respawntime == false then
return
end
if mapinfo == "Sprint" or mapinfo == "Freeroam" then
setTimer(timer2,respawntime*1000,1)
end
end
addEventHandler("onPlayerWasted",getRootElement(),respawnColor)

--Scoreboard Money Column & Refreshing
addEventHandler("onResourceStart",
getResourceRootElement(getThisResource()),
function()
setTimer(function()
exports.scoreboard:addScoreboardColumn("Money")
exports.scoreboard:addScoreboardColumn("FPS")
end,200,1)
end)

------------------------------------------

function getpersinfo(player,edit1,edit2,edit3,edit4,edit5,edit6,edit7,edit8,edit9,edit10,edit1,edit12,edit13,edit14,edit15,edit16,edit17,edit18)
local serial = getPlayerSerial(source)
executeSQLUpdate ( "PersonalInfo", "Edit1 = '"..edit1.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit2 = '"..edit2.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit3 = '"..edit3.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit4 = '"..edit4.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit5 = '"..edit5.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit6 = '"..edit6.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit7 = '"..edit7.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit8 = '"..edit8.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit9 = '"..edit9.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit10 = '"..edit10.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit11 = '"..edit11.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit12 = '"..edit12.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit13 = '"..edit13.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit14 = '"..edit14.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit15 = '"..edit15.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit16 = '"..edit16.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit17 = '"..edit17.."'","serial = '" .. serial .. "'")
executeSQLUpdate ( "PersonalInfo", "Edit18 = '"..edit18.."'","serial = '" .. serial .. "'")
outputChatBox("Your data has been updated!",player,200,0,100)
setElementData ( source ,"info.name",edit1,true)
setElementData ( source ,"info.country",edit2,true)
setElementData ( source ,"info.age",edit3,true)
setElementData ( source ,"info.email",edit4,true)
setElementData ( source ,"info.gender",edit5,true)
setElementData ( source ,"info.contact",edit6,true)
setElementData ( source ,"info.icq",edit7,true)
setElementData ( source ,"info.msn",edit8,true)
setElementData ( source ,"info.pma",edit9,true)
setElementData ( source ,"info.gt",edit10,true)
setElementData ( source ,"info.city",edit11,true)
setElementData ( source ,"info.gf",edit12,true)
setElementData ( source ,"info.bf",edit13,true)
setElementData ( source ,"info.bd",edit14,true)
setElementData ( source ,"info.zodiac",edit15,true)
setElementData ( source ,"info.info",edit16,true)
setElementData ( source ,"info.favcar",edit17,true)
setElementData ( source ,"info.favpl",edit18,true)
end
addEvent("ongetpersinfo",true)
addEventHandler("ongetpersinfo",getRootElement(),getpersinfo)

function cancel()
cancelEvent()
end
addEventHandler("onPlayerChat",getRootElement(),cancel)

function vehColor2()
local players = getElementsByType ( "player" )
for k,v in ipairs(players) do
local PVeh= getPedOccupiedVehicle(v)
local serial = getPlayerSerial(v)
local Col1 = executeSQLSelect ( "VColors", "Col1","serial = '" .. serial .. "'")
local Col2 = executeSQLSelect ( "VColors", "Col2","serial = '" .. serial .. "'")
local Col3 = executeSQLSelect ( "VColors", "Col3","serial = '" .. serial .. "'")
local Col4 = executeSQLSelect ( "VColors", "Col4","serial = '" .. serial .. "'")
local R = executeSQLSelect ( "LColors", "R","serial = '" .. serial .. "'")
local G = executeSQLSelect ( "LColors", "G","serial = '" .. serial .. "'")
local B = executeSQLSelect ( "LColors", "B","serial = '" .. serial .. "'")
setVehicleColor(PVeh,tonumber(Col1[1]["Col1"]),tonumber(Col2[1]["Col2"]),tonumber(Col3[1]["Col3"]),tonumber(Col4[1]["Col4"]) )
setVehicleOverrideLights ( PVeh, 2 )
setVehicleHeadLightColor(PVeh,tonumber(R[1]["R"]),tonumber(G[1]["G"]),tonumber(B[1]["B"]))
end
end

function ClientReadyVehicle()
local PVeh = getPedOccupiedVehicle(source)
local serial = getPlayerSerial(source)
local Col1 = executeSQLSelect ( "VColors", "Col1","serial = '" .. serial .. "'")
local Col2 = executeSQLSelect ( "VColors", "Col2","serial = '" .. serial .. "'")
local Col3 = executeSQLSelect ( "VColors", "Col3","serial = '" .. serial .. "'")
local Col4 = executeSQLSelect ( "VColors", "Col4","serial = '" .. serial .. "'")
local R = executeSQLSelect ( "LColors", "R","serial = '" .. serial .. "'")
local G = executeSQLSelect ( "LColors", "G","serial = '" .. serial .. "'")
local B = executeSQLSelect ( "LColors", "B","serial = '" .. serial .. "'")
setVehicleColor(PVeh,tonumber(Col1[1]["Col1"]),tonumber(Col2[1]["Col2"]),tonumber(Col3[1]["Col3"]),tonumber(Col4[1]["Col4"]) )
setVehicleOverrideLights ( PVeh, 2 )
setVehicleHeadLightColor(PVeh,tonumber(R[1]["R"]),tonumber(G[1]["G"]),tonumber(B[1]["B"]))
end
addEvent("onClientIsReady",true)
addEventHandler("onClientIsReady",getRootElement(),ClientReadyVehicle)

function vehColor3()
local PVeh= getPedOccupiedVehicle(source)
local serial = getPlayerSerial(source)
local Col1 = executeSQLSelect ( "VColors", "Col1","serial = '" .. serial .. "'")
local Col2 = executeSQLSelect ( "VColors", "Col2","serial = '" .. serial .. "'")
local Col3 = executeSQLSelect ( "VColors", "Col3","serial = '" .. serial .. "'")
local Col4 = executeSQLSelect ( "VColors", "Col4","serial = '" .. serial .. "'")
local R = executeSQLSelect ( "LColors", "R","serial = '" .. serial .. "'")
local G = executeSQLSelect ( "LColors", "G","serial = '" .. serial .. "'")
local B = executeSQLSelect ( "LColors", "B","serial = '" .. serial .. "'")
setVehicleColor(PVeh,tonumber(Col1[1]["Col1"]),tonumber(Col2[1]["Col2"]),tonumber(Col3[1]["Col3"]),tonumber(Col4[1]["Col4"]) )
setVehicleOverrideLights ( PVeh, 2 )
setVehicleHeadLightColor(PVeh,tonumber(R[1]["R"]),tonumber(G[1]["G"]),tonumber(B[1]["B"]))
end

function timer2()
setTimer(vehColor2,tonumber(respawntime)+1000,1)
end
--addEventHandler("onMapStarting",getRootElement(),timer)
addEventHandler("onPlayerPickUpRacePickup",getRootElement(),vehColor3)
addEventHandler("onPlayerReachCheckpoint",getRootElement(),vehColor3)

-- Copied From [PS]DazzaJay[AU]'s Vehiclelight script!(Thanks) -- edited some arguments...
local root = getRootElement ()
local thisResourceRoot = getResourceRootElement(getThisResource())
function thisResourceStart ()
local players = getElementsByType ( "player" )
for k,v in ipairs(players) do
bindKey ( v, "l", "down", toggleVehicleLights, "Lights on/off" )
end
end
function playerJoin ()
bindKey ( source, "l", "down", toggleVehicleLights, "Lights on/off" )
end
function toggleVehicleLights ( player, key, state )
local serial = getPlayerSerial(player)
local R = executeSQLSelect ( "LColors", "R","serial = '" .. serial .. "'")
local G = executeSQLSelect ( "LColors", "G","serial = '" .. serial .. "'")
local B = executeSQLSelect ( "LColors", "B","serial = '" .. serial .. "'")

if ( getPedOccupiedVehicleSeat ( player ) == 0 ) then
local veh = getPedOccupiedVehicle ( player )
if ( getVehicleOverrideLights ( veh ) ~= 2 ) then
setVehicleOverrideLights ( veh, 2 )
setVehicleHeadLightColor(veh,tonumber(R[1]["R"]),tonumber(G[1]["G"]),tonumber(B[1]["B"]))
else
setVehicleOverrideLights ( veh, 1 )
end
end
end
addEventHandler ( "onResourceStart", thisResourceRoot, thisResourceStart )
addEventHandler ( "onPlayerJoin", root, playerJoin )
--------------------------------------------------------------------

function RaceAttempts(mapInfo, mapOptions, gameOptions)
if mapInfo.modename == "Sprint" then
local players = getElementsByType("player")
for k,v in ipairs(players) do
local serial = getPlayerSerial(v)
local RaceAttemptsx = executeSQLSelect ( "RaceAttempts", "RaceAttempts","serial = '" .. serial .. "'")
local RaceAttempts = tonumber(RaceAttemptsx[1]["RaceAttempts"]) + 1
executeSQLUpdate ( "RaceAttempts", "RaceAttempts = '"..RaceAttempts.."'","serial = '" .. serial .. "'")
setElementData (v,"data.raceAttempts",RaceAttempts,true)
end
end
end
addEventHandler("onMapStarting",getRootElement(),RaceAttempts)

addEventHandler("onPlayerFinish", rootElement, raceWin )
addEventHandler("onMapStarting", rootElement , DestructionMoney)



pomoze ktos? a kolejna sprawa liczy mi te mapy w ktore sie gralo, ale jak wygram to nie zalicza mi tego do wins, i nie dodaje kasy tez, jest ktos tu kto by mi pomogl z tym, nawet zaplace jak bedzie trzeba

Postaw piwo autorowi tego posta
 

 
Tagi: przerobienie :: skryptu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Przerobienie skryptu Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku