-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
I would work if it was client-side.
-
How do you want to spawn player when you start gamemode if you didn't use the event that is triggered when gamemode starts? You spawn player when he joins the server or dies, so how can you spawn player that already joined and is already spawned? Use onGamemodeStart or onResourceStart event. http://development.mtasa.com/index.php? ... _Gamemodes http://development.mtasa.com/index.php? ... Mapmanager
-
Yes. You can use nightly builds to test 1.0 functions. Not all of them work correctly, that's because devs are still working hard.
-
I don't know if ALTER statement is usable in MTA because I never needed it in MTA, but that's what it's for. http://www.w3schools.com/sql/sql_alter.asp If you can edit a table in SQL database with SQL Database Browser then you can theoretically edit it with Lua script using executeSQLQuery
-
What mission? They are always there. If you all say it's not an object then Thehookerkiller01, it is not possible (at least now).
-
Not sure if there is an object of the light. If there is object of lights then you'd have to create it and rotate it but as I said I'm not sure if there is an object of light stream... Maybe the light appears when it's dark if so, there is an object of the searchlight but I don't know its ID.
-
onClientPlayerDamage Event - when someone else is damaged
50p replied to Phat Looser's topic in Scripting
Phat Looser, then this script can be made server-side... onPlayerDamage is triggered every time that player is hit (any player). If you want to make a custom wanted level script then you could use triggerClientEvent to show him more "wanted level stars". -
onClientPlayerDamage Event - when someone else is damaged
50p replied to Phat Looser's topic in Scripting
You could use setElementData to determine player being hit/shot. But why would you want this for every player client-side? You can use server-side event onPlayerDamage which is triggered for every player. I haven't really tested but are you sure onClientPlayerDamage is triggered only for local player? Sometimes documentation on wiki may be wrong. I used this event for my old script "got_hit" and I checked if the player that was hit/shot is local player. Try it. -
This is weird... I never had problem with files being placed in "...\deathmatch\" directory. Might be an MTA bug. If you read carefully you'd see in the first post it's client-side
-
What folders did you check? It should be in a folder named the same as resource folder on the server. Also unload the file to save memory (after you save, xmlUnloadFile).
-
If you have ever searched you would have found this within 5sec. reading main page on wiki http://development.mtasa.com/index.php? ... scripts.3F I'm not gonna repeat myself READ WIKI! If you don't understand wiki you have problem with reading and should learn english more before starting scripting.
-
-- server-side -- addEventHandler( "onResourceStart", getResourceRootElement(), function( ) setSkyGradient( 255, 0, 0, 0, 0, 0 ); -- Red to Black end )
-
Or download the new one that is on the same page as "data" files... Also, you should make a new admin account and delete your old from accounts.xml because nightly builds hashes passwords so you can't see people's passwords but hashed values.
-
r231.exe is not the only file you need to run nightly builds. You need to download "data" files too (currently the latest one is r188, that is fine) which can be downloaded from here: http://code.google.com/p/multitheftauto/downloads/list Download all that say "(required to run)".
-
https://community.multitheftauto.com/index.html?p ... ils&id=234 This is an example script which I recorded and posted on YouTube ( )so have fun!
-
First of all, read wiki over and over again! It's the first source where you should get all the info from! -- DO NOT USE source IN FUNCTION PARAMETERS! function hey( plr, command, ... ) -- ... <- 3 dots represent rest of the parameters passed to the function -- (in this case all the words that player types after /live) outputChatBox("Player 1 say: " .. table.concat( arg ), plr ) end addCommandHandler("live", hey)
-
I didn't want to upload them on community.multitheftauto.com because the stable version of MTA is DP2.3 and people who use DP2.3 would complain about me releasing scripts that are not useful yet but if you really want I can do that.
-
You can't give peds weapons on the same frame. Try to use a timer to give them weapon after they spawn and yes, makePedUseGun doesn't work (I think it was removed).
-
LOL. What would be the size of such a resource, possibly a few hundreds of megabytes? Mine is 2MB and has 27 sounds.
-
There is a little bit maths required and you can make it with setObjectRotation. Look into my nice script where I calculated where you got hit from. If you get hit from left, left screen edge is red (or left side of a circle, depends which style you set). That's calculating 2 points and that's what you should do but you should get position of where the camera is looking (getWolrdFromScreenPosition) and the position of camera (getCameraPosition for DP2.x, or getCameraMatrix for nightly builds and 1.0 version of MTA).
-
Then start debugging. outputChatBox/outputDebugString what source is (use tostring( source ) or type( source ) ), if it's "userdata" it means it's an element, then try getElementType( source ).
-
capitanazop, from the file name I see you want to make a script with unreal tournament sounds (ultrakill, multikill, godlike, etc.), right? I'm making such script right now and maybe when I'll to get it to work I'll ask to include it into installer and upload it on community.multitheftauto.com. It works nice so far
-
Everything looks fine. What version of MTA are you using?
-
http://development.mtasa.com/index.php?title=DxDrawText Use this one instead of the label. (I don't know for sure if it works in DP2.x) The scale parameter is what you might want to improve. It's available in 1.0 (aka nightly builds). Also, if you want to create a label inside a GUI window with dx functions you wouldn't be able to (if window is movable) unless you want to change it's position whenever window moves.
-
You will have to use different font.