Wysłany: 2018-08-16, 13:57
l3g3nd4
Mapper & Modeler
Wiek: 22 Na forum: 3399 dni Posty: 156
Nick w MP: l3g3nd4
Piwa : 602
Witam. Mam ot?? taki to kod:
local Event = false
local playersCount = 0
function Event_start ()
if not Event then
Event = true
outputChatBox ( "Zapisy na event s? w??czone, wpisz /do??cz aby do??czy? na event !" , getRootElement (), 255 , 255 , 255 , true )
else
Event = false
outputChatBox ( "Zapisy na event s? wy??czone." , getRootElement (), 255 , 255 , 255 , true )
end
end
addCommandHandler ( "event_zapisy" , Event_start )
addCommandHandler ( "event_stworz" ,function( plr , cmd , t2 , t1 , value , ...)
if not t2 or not t1 or not ... or not tonumber ( value ) then
outputChatBox ( "U?yj: /event_stworz <nazwa eventu> <ilo?? graczy na evencie>" , plr , 255 , 255 , 255 )
end
local name_event = table . concat ({ t2 })
local value = table . concat ({ t1 })
if tonumber ( value ) < 8 then
outputChatBox ( "Wpisa?e? za ma?? liczb? garczy, kt?ra ma by? na evencie!" , plr , 255 , 255 , 255 )
return
end
if tonumber ( value ) > 64 then
outputChatBox ( "Wpisa?e? za du?? liczb? garczy, kt?ra ma by? na evencie!" , plr , 255 , 255 , 255 )
return
end
if tonumber ( value ) > 0 then
local name = getPlayerName ( plr )
outputChatBox ( "Administrator: #008000" .. name .. " #FFFFFFstworzy? event #008000" .. name_event .. "#FFFFFF , wolne miejsca: #0080000/" .. value .. "" , getRootElement (), 255 , 255 , 255 , true )
return
end
end
)
function Join_event ( plr , cmd , t1 , value , playersCount )
if not Event then return end
local value = table . concat ({ t1 })
if getElementData ( plr , "player:event" ) then
outputChatBox ( "Ju? jestes na jakim? evencie!" , plr , 255 , 255 , 255 , true )
return
end
if playersCount >= value then -- 44 LINIJKA
outputChatBox ( "Ten event ju? osi?gn?? maksymaln? ilo?? graczy !" , getRootElement (), 255 , 255 , 255 , true )
return
end
setElementData ( plr , "player:event" , true )
playersCount = ( playersCount or 0 ) + 1
setElementPosition ( plr , - 2422.37842 , - 607.25677 , 132.56250 )
outputChatBox ( "Witaj na evencie !" , plr , 255 , 255 , 255 , true )
end
addCommandHandler ( "do??cz" , Join_event )
function costam ( plr )
setElementData ( plr , "player:event" , false )
end
addCommandHandler ( "s" , costam )
i w linijcie 44 wyst?puj? b??d "[13:36] ERROR: [skrypty]\Event2\sourceS.lua:44: attempt to compare string with nil"
Wysłany: 2018-08-16, 14:41
Remix110
Pewna osóbka :3
Wiek: 40 Na forum: 3663 dni Posty: 291
Nick w MP: GoodNight
Piwa : 15
Podaj 44 linijke?
Podpis
[you]
pomogłem?
Możesz dać piwko, przyda się na imprezę
Wysłany: 2018-08-16, 14:47
l3g3nd4
Mapper & Modeler
Wiek: 22 Na forum: 3399 dni Posty: 156
Nick w MP: l3g3nd4
Piwa : 602
Remix110 , Jest podana ? Przypatrz si? w kod.
[ Dodano : 2018-08-16, 14:47 ]
if playersCount >= value then -- 44 LINIJKA
Podpis
Discord: l3g3nd4#9882
GG: 66391457
Wysłany: 2018-08-16, 15:15
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
l3g3nd4 , czy w wpisywaniu komendy /do??cz podajesz wszystkie argumenty jakie poda?e? we funkcji? mam na my?li to
( plr , cmd , t1 , value , playersCount )
/do??cz [jakie? t1] [warto??] [warto??]
Tagi: problm :: systemem :: eventów.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: