kalitonchik
Members-
Posts
102 -
Joined
-
Last visited
Everything posted by kalitonchik
-
okey... I well understand, but i must see new syntax examples
-
https://community.multitheftauto.com/index.html?p ... ils&id=283 this resource work perfect in mta sa dm dp 2.3 but in MTA SA DM V1.0 nightly build i start resource and i can't spawn (i see chiliad clouds) i think reason is erors in nightly build =D 1 in script log Script.lua: addEventHandler: This handle already exists - Line: 9 2 in server log [19:30:47] WARNING: Player.lua(Line 13) [server] attachElementToElement is deprecated and may not work in future versions. Please replace with attachElements before Tuesday. [19:30:47] Some files in 'Scripting Introduction' use deprecated functions. [19:30:47] Use the 'upgrade' command to perform a basic upgrade of resources. [19:30:47] Starting Scripting Introduction [19:30:48] start: Resource 'Scripting Introduction' started [19:30:48] ADMIN: Resource 'Scripting Introduction' started by $.Kalitonchik(LV so in MTA SA DM V1.0 are new syntaxes?
-
sa-mp sucks and i dont play (last play 2 years ago)
-
objects, vehicles only? i tryed cheange Skin 31 at Ryder skin .dff and txd in mta dm nothing hapens bad...
-
please visit this topic https://forum.multitheftauto.com/viewtop ... 91&t=24292 i think cheanging TXD is beter and work in all resolutins without bugs
-
My TXD run perfect in single player Please help me solve mistake function Replace ( startedResource ) if ( startedResource == getThisResource() ) then outputChatBox ( "Replace" ) txd = engineLoadTXD ( "data/chnsaw.txd" ) engineImportTXD ( txd, 341 ) end end addEventHandler ( "onClientResourceStart", getRootElement(), Replace )
-
function installchnsaw ( startedResource ) if ( startedResource == getThisResource() ) then outputChatBox ( "chnsaw_hud" ) txd = engineLoadTXD ( "data/chnsawicon.txd" ) engineImportTXD ( txd, chnsaw ) txd = engineLoadTXD ( "data/chnsawicon.txd" ) engineReplaceModel ( txd, chnsawicon ) end end addEventHandler ( "onClientResourceStart", getRootElement(), chnsaw ) http://development.mtasa.com/index.php? ... ineLoadTXD To export chnsawicon i use IMGTOOL 2.0 next i use TXD workshop and formated TXD in png then i worked vs photoshop thet i formated egean in TXD Script run -no erors but nothing hapens =( Please correct my script i think need set chnsawicon.txd id! but i dont know id of ammo huds I can not run, where mistake.
-
function showClientImage() image = guiCreateStaticImage( 795, 35, 75, 100, "image1.png", false ) guiStaticImageLoadImage(image,"2.png") guiStaticImageLoadImage(image,"3.png") guiStaticImageLoadImage(image,"4.png") guiStaticImageLoadImage(image,"5.png") guiStaticImageLoadImage(image,"6.png") guiStaticImageLoadImage(image,"7.png") guiStaticImageLoadImage(image,"8.png") guiStaticImageLoadImage(image,"9.png") guiStaticImageLoadImage(image,"14.png") guiStaticImageLoadImage(image,"16.png") guiStaticImageLoadImage(image,"17.png") guiStaticImageLoadImage(image,"18.png") guiStaticImageLoadImage(image,"22.png") guiStaticImageLoadImage(image,"23.png") guiStaticImageLoadImage(image,"24.png") guiStaticImageLoadImage(image,"25.png") guiStaticImageLoadImage(image,"26.png") guiStaticImageLoadImage(image,"27.png") guiStaticImageLoadImage(image,"28.png") guiStaticImageLoadImage(image,"29.png") guiStaticImageLoadImage(image,"30.png") guiStaticImageLoadImage(image,"31.png") guiStaticImageLoadImage(image,"32.png") guiStaticImageLoadImage(image,"33.png") guiStaticImageLoadImage(image,"34.png") guiStaticImageLoadImage(image,"35.png") guiStaticImageLoadImage(image,"36.png") guiStaticImageLoadImage(image,"37.png") guiStaticImageLoadImage(image,"38.png") guiStaticImageLoadImage(image,"39.png") guiStaticImageLoadImage(image,"41.png") guiStaticImageLoadImage(image,"42.png") guiStaticImageLoadImage(image,"43.png") guiStaticImageLoadImage(image,"44.png") guiStaticImageLoadImage(image,"45.png") guiStaticImageLoadImage(image,"46.png") end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage ) function showClientImage ( prevSlot, newSlot ) local weaponID = getPlayerWeapon( getLocalPlayer(), newSlot); guiStaticImageLoadImage( image, "Hud_ammo/".. tostring( weaponID ) ..".png" ); end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), showClientImage ) I do that- image name = id of weapon Label do not Create when i chose weapon
-
I did not understand How can show up guiStaticImageLoadImage if you dont indicate (float x, float y, float width, float height) which differ of youre example local weaponID = [color=#BF0000]getPlayerWeapon[/color]( getLocalPlayer(), newSlot); [color=#00BFFF]guiStaticImageLoadImage[/color]( [color=#0040FF]WEAPON_IMAGE[/color], "direction/".. tostring( [color=#BF0000]weaponID[/color] ) .."[color=#0040FF].png[/color]" ); and this one [color=#BF0000]if getPlayerWeapon[/color](getLocalPlayer(),newSlot) == [color=#BF0000]weaponID[/color] then [color=#00BFFF]guiCreateStaticImage[/color]([color=#00BFFF] 795, 35, 75, 100,[/color] "direction/[color=#0000FF]Image_name.png[/color]", false ) then I must create a image individual at all 38 weapon
-
guiStaticImageLoadImage(x, y,width, height, " <file src="Hud_ammo/X.png" />".. tostring( weaponID ) ..".png" )
-
Whot i lost? label dont create function showClientImage ( prevSlot, newSlot ) local weaponID = getPlayerWeapon( getLocalPlayer(), newSlot) guiStaticImageLoadImage( 795, 35, 75, 100, "Hud_ammo/".. tostring( weaponID ) ..".png" ) end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), showClientImage )
-
i have all weapon ICO from http://wiki.wegame.com/GTA_San_Andreas_Weapons/
-
Example function showClientImage ( prevSlot, newSlot ) if getPlayerWeapon(getLocalPlayer(),newSlot) == 31 then guiCreateStaticImage( 795, 35, 75, 100, "Main/M4.png", false ) end end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), showClientImage ) But i have problem, label dont update... so i get fistly saw second m4 and i have 2 labels runing togetherXD
-
i know that...
-
I know that but mostly play in 1024X but we can do local screenWidth, screenHeight = guiGetScreenSize() if screenWidth < 1280 and screenHeight < 1024 then
-
I created AmmoHudComponent But it is only GuiStaticImage (performs decorative function) I want that, this Image should fulfil its calling I mean when the player's hands Chainsaw, show up Chainsaw modified AmmoHudComponent My first step function showClientImage() guiCreateStaticImage( 795, 35, 75, 100, "Main/Chainsaw.png", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage ) next step Switching weapons is changing AmmoHudComponent who will help change the game interface? I think that will work with http://development.mtasa.com/index.php?title=BindKey
-
function onMapFinish ( name ) update guiTextLabel end addEventHandler( "update", root, onMapFinish) i dont know syntax i search everywhere (wiki, ore in other game mode resources)
-
Whot you mean with I need update current team when start new map with new teams. I think its licke that addEventHandler( "onGamemodeMapStop", removeguiTextLabel) Help
-
local guiTextLabel = nil local guiTextLabelTeamName = nil local guiTextLabelText = nil function showPlayerTheirTeam(player, text, r, g, b) if ( player == getLocalPlayer() ) then if ( guiTextLabel ) then guiSetText ( guiTextLabelTeamName, text ) guiSetColor ( guiTextLabelTeamName, r, g, b ) else guiTextLabel = guiCreateLabel( 0.01, 0.20, 0.8203, 0.5, "Current Team: ", true ) if ( guiTextLabel ) then local guiLength = guiLabelGetTextExtent ( guiTextLabel ) local screenX, screenY = guiGetScreenSize() guiLength = tonumber(guiLength) / screenX local guiTextLabelTeamName = guiCreateLabel( tonumber(guiLength) + 0.01, 0.20, 1, 0.5, text, true ) if ( guiTextLabelTeamName ) then guiLabelSetColor ( guiTextLabelTeamName, tonumber(r), tonumber(g), tonumber(b) ) end end end end end function onClientPlayerSpawn() --outputChatBox ( "Ive Loaded, contacting server!" ) triggerServerEvent ( "Event_clientScriptLoaded", getRootElement(), getLocalPlayer() ) end addEvent ( "Event_showPlayerTheirTeam", true ) addEventHandler ( "Event_showPlayerTheirTeam", getRootElement(), showPlayerTheirTeam ) addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), onClientPlayerSpawn ) Problem is, when player spawn then Label shows Current Team, but when map changes Label shows the old Team from previous map. You can make a reconnect, for update Label (but it is inconvenient). Need to finish script Update Label whit what functions? add/remove function? destroy element?
-
normal notepad does not check for errors in syntax
-
my respect for your help where can download lua program is this program free? http://www.lua.org/download.html
-
yes.... and how it should look like, and whot i lost? function player_Wasted () if ( player_Wasted ) then setGameSpeed ( tonumber ( 1 ) ) end addCommandHandler ( "onPlayerWasted", getRootElement(), setgamespeed )
-
how to make a script, who performs this function when the player dies his death is shown in slow motion I assume that this is related to - onPlayerWasted/got killed event and I do not know the syntax of this function function player_Wasted (whot i need write here) if ( player_Wasted ) then ### show slow motion 2x with a period of two seconds addEventHandler ( "onPlayerWasted", XXXXXX, player_Wasted ) how to do it and in general, how to create a good script in note pad which does not show errors in syntax (what a pity...) and lua language in school does not teach ( we teach ''borland delphi'' ) alone I will not be able to learn lua ( because I have little time - Training (I am the master of sports gymnastics)
-
addEventHandler ( "onPlayerSpawn", eror' expected near 'onPlayerSpawn' ERROR: Couldn't packetize argument list, invalid element specified.
-
i mean move up then down move up then down........ (continuously)
