-
Posts
1,105 -
Joined
-
Last visited
Everything posted by Aibo
-
why not prevent it then, instead of writing warnings in caps? local lastRnd=0 function advert() local rnd = math.random( 1, #adMessages ) while rnd == lastRnd and #adMessages > 1 do rnd = math.random( 1, #adMessages ) end outputChatBox( adMessages[ rnd ], getRootElement(), 255, 255, 255, true ) lastRnd=rnd end
-
https://wiki.multitheftauto.com/wiki/RU/ ... Scoreboard all scoreboard exported functions are server-side.
-
коллизии у приаттаченного объекта убрать?
-
"totalPlayers" is not an element, it's a string. maybe a global variable is what you need? anyway, it depends on element and what you mean by "global". if the element is synced, it's data obviously synced also, as i recall.
-
1. if you didn't notice, gui is set to show on player login, not on join. 2. your script will show the window every time ANY resource starts.
-
because first argument passed by "onPlayerLogin" event is player's previous account, not the player element player element is the source of the event. and you're not specifying for which player the event should be triggered. -- server function onlogin() triggerClientEvent(source, "showGUI", source) end addEventHandler("onPlayerLogin", getRootElement(), onlogin) and you dont need (player) in client handler.
-
speed is set using 0-1 range. so 0.5 for you. well actually not range, it is more like speed multiplier, so 0.5 will be two times slower, and 2 — two times faster.
-
you forgot to close tag: <info author="Matias" type="gamemode" name="Cod2Mod" version="1.0.0" /> and all your script files are serverside. i bet some of them are client scripts, so use type="client" for those.
-
eof means "end of file". and you've misread the error that "told you to add it"
-
a чего в мете type не указан?
-
as it was discussed here a million times already: dont use source for anything you can think of, it causes confusion. source is a hidden variable that contains source of the event, passed to handler function. even if you do something like «source = getLocalPlayer()» in the start of your script, in your handler function (and i bet this code runs in some event handler) source will still be the source of the event in that function. because your global source gets replaced with source local to the function.
-
if it is server-side, why are you using onClientResourceStart, which is client-side event? as for XML — your syntax is totally wrong: https://wiki.multitheftauto.com/wiki/Water
-
since setElementModel
-
well correct way would be add this command to ACL.
-
well every player will see it, because client scripts run for every player. loop through players onClientRender event, and draw a bar for every one, if player ~= getLocalPlayer().
-
how can it return multiple players when it simply cant? check other parts of your script, maybe you're calling it twice.
-
local black = tocolor(0,0,0,255) local screenWidth, screenHeight = guiGetScreenSize() local boxHeight = screenHeight/5 function drawLetterBox() dxDrawRectangle(0, 0, screenWidth, boxHeight, black) dxDrawRectangle(0, screenHeight-boxHeight, screenWidth, boxHeight, black) end addEventHandler("onClientRender", getRootElement(), drawLetterBox)
-
same thing, change function kick (commandName, playerSource, playerName, opis) to function kick (playerSource, commandName, playerName, opis)
-
I don't need your help. . . Aspect other scripters. In my posts not to answer please.
-
with your script you have to write eXAcT full name, including case. your script must be in meta.xml, server type you must have police skin you must be allowed to use kickPlayer function you resource must be allowed to use kickPlayer function etc. as you see there are too many factors with your "not working". use /debugscript 3
-
open admin panel, resources tab, find race resource, double-click and change this option. well that's what resource settings are for.
-
policeSkins = { [280]=true,[281]=true,[282]=true,[283]=true,[284]=true,[285]=true,[286]=true } function kick(playerSource, commandName, playerName, opis) if policeSkins[getElementModel(playerSource)] then local player = getPlayerFromName(playerName) if player and hasObjectPermissionTo(playerSource, "function.kickPlayer") then -- Kick the player kickPlayer(player, playerSource, opis) end end end addCommandHandler("wyrzuc", kick)
-
https://wiki.multitheftauto.com/wiki/AddCommandHandler player playerSource, string commandName, [string arg1, string arg2, ...] your variables are a mess, playerSource, then sourcePlayer, then kicked (what?).
-
because source is a marker, not a vehicle
-
Can't upload images for my resource
Aibo replied to DakiLLa's topic in Site/Forum/Discord/Mantis/Wiki related
i confirm, got same thing going on with one of my resources.
