Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: ogien
1. Ogien
Witam mam skrypt na pozary
i mam taki blad
client.lua:7 attempt to index local 'colshape' (a userdata value)
prosze o to kod
Kod:


local fireTypes = {'fire', 'fire_med', 'fire_large'};
local fireData = {};

addEvent('attemptCreateFire', true);

addEventHandler('attemptCreateFire', root, function(colshape)
if (not colshape) or (not colshape.type == 'colshape') then return end

local posVec = colshape.position;
local effect = Effect(fireTypes[math.random(1, #fireTypes)], posVec);
fireData[colshape] = effect;

addEventHandler('onClientElementDestroy', effect, function() fireData[colshape] = nil end);
addEventHandler('onClientElementDestroy', colshape, function() fireData[colshape]:destroy(); fireData[colshape] = nil end);
end);

Bardzo prosze o pomoc poniewasz nwm co z tym zrobic.
Za pomoc daje :piwo:
2. Ogien
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? ?
3. [INNE] ogien
Witam!!

Chcia?bym na m?j serwer truck doda? stra? pozarn? lae nie moge doda? bo niemam systemu po?aru. Jakby kto? umia? zrobi? system pozaru zadarmo lub p?atnie to bym prosi? o kontakt!
Pozdrawiam!!