-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
If you've read the entire topic or at least a few last pages, you wouldn't post already mentioned things. You don't bring anything new really. As I said read a few pages back as they are the most recent ones... I can't seem to find a way to ignore the xml declaration in meta.xml files. I've been googling but can't find it. I guess I'll have to load the the file into string and remove text from <? to ?> before I parse it.
-
onClientChatMessage is triggerend whenever text is shown in the chat box (even with outputChatBox). So when you outputChatBox( "FAILURE" ) you this will trigger the event again and again and again.. It's like infinite loop. Besides the "text" that is shown in the chatbox is not only the text you typed in but also your nickname and colours. Eg.: "Me: hello" the "text" argument will be like: "Me: #COLOURhello" I'm just wondering why you need to use "pos" only in chatbox. Can't you use addCommandHandler()?
-
First of all, don't TRIPLE post unless you have good reason. Second of all, search the forum first... You're not the only one who wants scripters: - https://forum.multitheftauto.com/viewtop ... 91&t=25081 - https://forum.multitheftauto.com/viewtop ... 91&t=25139 - https://forum.multitheftauto.com/viewtop ... 91&t=24929 - https://forum.multitheftauto.com/viewtop ... 91&t=24670 - https://forum.multitheftauto.com/viewtop ... 91&t=24643 - https://forum.multitheftauto.com/viewtop ... 91&t=24637 Last but not least, there is a guy that is willing to help, try to talk to him https://forum.multitheftauto.com/viewtop ... 91&t=25038
-
https://wiki.multitheftauto.com/index.ph ... ourceStart Does it say player in the parameters box?
-
Show us your current code and tell us what you do to test the script.
-
You're not major noob... It happens if you're still an unexperienced scripter. Don't worry experience comes with time, CodeMaster For client-side outputChatBox, 2nd arguments is not visibleTo.. it's the red colour. Frugle, use /debugscript 3, command to open a "debug window" where you'll see all the errors/warnings when executing your scripts but before you type that command in you have to login as an admin.
-
Go back a page or 2 and read if you haven't already. Your funny theory about <?[id] ... ?> made me ROFL. Seriously. And there is lots of files with encoding="UTF-16" (and probably all of them are race maps) because that's how the file was created with Race Converter which is simple C# application to convert maps form MTA: Race to MTA: SA.
-
It seems that it's MTA's bug. I just tested my peds script, I gave them weapons (/giveweapon ) and they weren't aiming in the correct direction but they were walking in my direction between the shots. Like sniper rifle, when reloading you can walk a bit before the next shot. I made them aim my head and sometimes I did get hit but most of the time they missed me, even when I was standing still.
-
From the Polish part, I understand that the problem is not related to the gun itself but the ped rotation. He's trying to say the ped is not facing the player but in different directions. @veronapl, Try my peds resource which you can download here: https://community.multitheftauto.com/index.php?p= ... ils&id=234 My peds were simply following me, but to make them follow you, you also need to calculate the angle in which they need to go, so I think that resource will help you. Watch the video presentation here: You may also use setPedAimTarget to make them aim at you which I think would be the best choice for you.
-
Could you send me the meta.xml Skull~Death?
-
You can add new columns and have what you want. https://wiki.multitheftauto.com/index.ph ... Scoreboard
-
It's not just about being lazy. It saves you typing, bytes and also speeds up your script execution because you call getLocalPlayer() only once.
-
Sorry, but I can't dig deeper. If you don't want any animations like fading out the window you should find the GUI variables and use guiSetVisible() to hide it. I can't help you with this now... As I said, I'm busy with Script Editor.
-
Make the team stand out. When I looked at that screenshot first time I thought that [TEAM] is a clan and there were 2 members of that clan playing Sorry, personally I don't like this scoreboard, it reminds me SA-MP too much!
-
Does it show you a pop up window with the error message or does it crash and show bug report window? Also, what program did you use to save the changes (the credits are probably in meta.xml, right?) Also, what is the exact message you get? EDIT: To everyone who get "System.NullReferenceException" in 0.1.8a or 0.1.10a, could you please explain how to reproduce these crashes? I know it happens - after you change file name (by editing label in Resource Explorer) - press "Delete file" from the context menu in Resource Explorer - or change the resource from the combo box Thank you.
-
You can use shared member functions. That is https://wiki.multitheftauto.com/index.ph ... ll_classes Use :Text() to get the text form the text box, label, window, etc.
-
Why do you create new topic for the same question?! And explain more in 1 post...
-
So do you know which arguments are bad now? As I said, "userdata" is OK but the colours are not. Before you send the colour values to the server (triggerServerEvent) make sure the values are numbers (in the client-side script) with the same method (tostring() and outputChatBox)
-
I can't do anything about it. When the xml file is loaded, it's loaded... The .NET parser treats these files as it does.. If you can find a work around it I'd like to take a look at it. I'm going to make the delete item work once creating new resources will work properly. EDIT: This "Object reference not set to an instance of an object." bug is now eliminated in patch 0.1.8a, Deddalt. Go ahead and download it. Reply if it still doesn't work. I hope it will Most race maps will give you that message read my recent posts on the previous page...
-
So what is actually wrong? It saves but doesn't save? Doesn't get the account data? accounts.xml is not updated?
-
Any errors/warnings in the debug window/box (/debugscript 3)?
-
I can't seem to find a way to ignore the xml declaration in meta.xml files. I've been googling but can't find it. I guess I'll have to load the the file into string and remove text from <? to ?> before I parse it.
-
You can use the same function for your commands and triggerServerEvent. Add this code in your function that is called when you press a button of the teams: local me = getLocalPlayer(); -- when you want to join Cops (cobs button): triggerServerEvent( "ClientWantsToJoinTeam", me, me, "", "Cops" ); -- or when you want to join Robs (robs button): triggerServerEvent( "ClientWantsToJoinTeam", me, me, "", "Robs" ); This is server-side code for joining teams (1 function for 1 event and 1 commands): function joinTeam( plr, cmd, teamName ) -- these are parameters passed from commands local team = getTeamFromName( teamName ); -- get the team element needed for setPlayerTeam if ( team ) then setPlayerTeam( plr, team ); outputChatBox( "You are now '".. teamName .."' member!", plr ); killPed( plr ); else outputChatBox( "Team '".. teamName .. "' does not exists.", plr ); end end addEvent( "ClientWantsToJoinTeam", true ); addEventHandler( "ClientWantsToJoinTeam", getRootElement( ), joinTeam ); addCommandHandler( "jointeam", joinTeam ); With this code you can use a command to join a team by name like: Or, you can trigger server event with the team name as the 5th argument because 5th argument will be teamName in the joinTeam function.
