Wysłany: 2015-07-31, 08:49
pomaza
Wiek: 39 Na forum: 3982 dni Posty: 79
Piwa : 2
Witam mam skrypt na po?ary ale niestety jak go stworze to tylko ja go widze.
To jest kod:
serwer
Kod:
function scriptCreateFire ( player, command )
local acc = getAccountName (getPlayerAccount(player))
if isObjectInACLGroup ("user."..acc, aclGetGroup ("Admin")) then
local luckyBugger = getRandomPlayer() -- get a random player
local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position
createFire ( x + 5 , y, z , 20) -- create the fire in the player's position but with x + 5
end
end
--Attach the 'scriptCreateFire' function to the "flame" command
addCommandHandler ( "flamefogo", scriptCreateFire ) -- /flame is the command to activate the script
a tu client
Kod: function scriptCreateFire ( commandName )
local luckyBugger = getLocalPlayer() -- get the local player
local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position
createFire ( x + 5 , y, z , 20) -- create the fire in the player's position but with x +5
end
--Attach the 'scriptCreateFire' function to the "flame" command
addCommandHandler ( "flame", scriptCreateFire ) -- /flame is the command to activate the script
Bym chcia? ?eby ka?dy j? widzia? a jak to robi? ?
Wysłany: 2015-07-31, 09:12
Fanciak
BOT
Wiek: 25 Na forum: 4446 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
Pobaw si? stronami skryptu ( client / server )
Wysłany: 2015-07-31, 09:53
Loop
Inspektor
Wiek: 27 Na forum: 4289 dni Posty: 311
Nick w MP: Inspektor
Piwa : 201
Z clienta zmieniasz na server proste.
Wysłany: 2015-07-31, 11:26
pomaza
Wiek: 39 Na forum: 3982 dni Posty: 79
Piwa : 2
Tera wgl nie dziala
[ Dodano : 2015-07-31, 11:33 ]
blad : tu call global 'getLocalPlayer' (a nil value)
[ Dodano : 2015-07-31, 11:33 ]
to call *
Wysłany: 2015-07-31, 11:46
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
function scriptCreateFire ( gracz , commandName )
local x , y , z = getElementPosition ( gracz )
createFire ( x + 5 , y , z , 20 )
end
addCommandHandler ( "flame" , scriptCreateFire )
C-SIDE
Poczytaj sobie jakie argumenty zwraca addCommandHandler, zrozumiesz b??d
Tagi: ogien
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: