[Plugin] SAMP.NET (DotNet / Mono hook) 0.6 BETA
#21

A download link is available!
I've not thoroughly tested everything, so please report bugs and I'll try and get them fixed ASAP.
Reply
#22

Amazing man; amazing
However I guess you have forgot to implement enough functions. Like GetPlayerVehicle
Can you also upload a zip file that contain source code ? (I dislike svn clients)
Still lots of function are missing; AddVehicleComponent
Reply
#23

Quote:
Originally Posted by samiras
Посмотреть сообщение
However I guess you have forgot to implement enough functions. Like GetPlayerVehicle
Quote:
Originally Posted by samiras
Посмотреть сообщение
Still lots of function are missing; AddVehicleComponent
I'm aware I missed a lot of functions. I'm still working on it, it's still in alpha of course. I just wanted to get a release out to show people that I am actually working on it

Quote:
Originally Posted by samiras
Посмотреть сообщение
Can you also upload a zip file that contain source code ? (I dislike svn clients)
Sure, I'll put up a download for the source a bit later (Y)
Reply
#24

Yasahiro,

I've been testing it out and only found a little problem.

When i start the server i get a list with all the functions saying "not found" in front of them, this occurs when the plugin loads.

The problem: (Note that this occurs with every single function, but i only quoted a few as example, also it does not appear in the server log file)
Код:
[...]
::SetWorldTime - not found
::TextDrawCreate - not found
::TextDrawLetterSize - not found
::TextDrawAlignment - not found
::TextDrawColor - not found
::TextDrawUseBox - not found
::TextDrawSetShadow - not found
::TextDrawSetOutline - not found
::TextDrawBackgroundColor - not found
::TextDrawFont - not found
::TextDrawShowForPlayer - not found
::TextDrawHideForPlayer - not found
::TextDrawSetString - not found
::GetPlayerState - not found
::SetPlayerTime - not found
::IsPlayerConnected - not found
Note: You should add into your post that you need Mono installed & you need to have the mono path added to your system in order to run the server, a lot of people will get a sample mono error and they wont know what to do.

Other than that I'm having an excellent experience,
I've been extending the API as i go trough and need more functions and made the Natives class public and it's awesome! (But note that the error explained above happens with your original release too).

If you need a commiter hand let me know.

Also I will try to rebuild the hook to see if the error explained above goes away, but currently I'm having some unresolved external symbols error (after adding the libraries) and did'nt had time to look at it yet.

Congratulations for this awesome, awesome wrapper and Thank you!
Reply
#25

Quote:
Originally Posted by Whiteagle
Посмотреть сообщение
The problem: (Note that this occurs with every single function, but i only quoted a few as example, also it does not appear in the server log file)
The only reason I can think that's happening is the game mode isn't compiled, or isn't being used by the server. When I tested it, I only had the "not found" output if the methods didn't exist as part of InvokeFunction in the PAWN script. The reason it doesn't save in the server log is because it uses C++ std::cout to write to the console as opposed to using logprintf. Though, it's a good thing I kept it in as it helped you to find out that error.

Quote:
Originally Posted by Whiteagle
Посмотреть сообщение
Note: You should add into your post that you need Mono installed & you need to have the mono path added to your system in order to run the server, a lot of people will get a sample mono error and they wont know what to do.
Good find, I shall test and confirm it on a machine that doesn't have Mono. Thanks for pointing that out.
Reply
#26

Quote:
Originally Posted by Yasahiro
Посмотреть сообщение
The only reason I can think that's happening is the game mode isn't compiled, or isn't being used by the server. When I tested it, I only had the "not found" output if the methods didn't exist as part of InvokeFunction in the PAWN script. The reason it doesn't save in the server log is because it uses C++ std::cout to write to the console as opposed to using logprintf. Though, it's a good thing I kept it in as it helped you to find out that error.


Good find, I shall test and confirm it on a machine that doesn't have Mono. Thanks for pointing that out.
Hello,
Thanks for the answer!

Actually my gamemode is compiled & set as the server gamemode.
I added a printf in the gamemode main and I get the printf after the error messages.

I'll check the plugin code tomorrow and try to figure out what's causing this.

Thank you,
Diogo Raminhos.
Reply
#27

Any news about next release date ?
Reply
#28

Quote:
Originally Posted by samiras
Посмотреть сообщение
Any news about next release date ?
Just released 0.2 alpha. Not a major update, but I did include vehicle components and player vehicles. I shall get to work on implementing as much more as I can.
Reply
#29

Quote:
Originally Posted by Yasahiro
Посмотреть сообщение
Just released 0.2 alpha. Not a major update, but I did include vehicle components and player vehicles. I shall get to work on implementing as much more as I can.
Interesting ! Thank you for your good activity and the source code.
Reply
#30

Finally a new release.
What about remote script load functionality; Is it on your list ?
Going to test new version. Thank you
Reply
#31

Quote:
Originally Posted by samiras
Посмотреть сообщение
Finally a new release.
What about remote script load functionality; Is it on your list ?
Going to test new version. Thank you
Sorry about the delay, I have been working non-stop to get a Linux version working
Indeed the remote script load functionality is on my list of features, I'll see if I can implement it in the next update for you.

I can't guarantee this update is working properly on all systems since there was big changes I made, so be gentle.
Reply
#32

Quote:
Originally Posted by Yasahiro
Посмотреть сообщение
Sure I'll work on adding debug information.
Also, what's the value of playerSpawns[0]?
PHP код:
private Vector3[] playerSpawns = new Vector3[]
        {
            new 
Vector3(1958.3783f1343.1572f15.3746f),
            new 
Vector3(2199.6531f1393.3678f10.8203f),
            new 
Vector3(2483.5977f1222.0825f10.8203f),
            new 
Vector3(2637.2712f1129.2743f11.1797f),
            new 
Vector3(2000.0106f1521.1111f17.0625f),
            new 
Vector3(2024.8190f1917.9425f12.3386f),
            new 
Vector3(2261.9048f2035.9547f10.8203f),
            new 
Vector3(2262.0986f2398.6572f10.8203f),
            new 
Vector3(2244.2566f2523.7280f10.8203f),
            new 
Vector3(2335.3228f2786.4478f10.8203f),
            new 
Vector3(2150.0186f2734.2297f11.1763f),
            new 
Vector3(2158.0811f2797.5488f10.8203f),
            new 
Vector3(1969.8301f2722.8564f10.8203f),
            new 
Vector3(1652.0555f2709.4072f10.8265f),
            new 
Vector3(1564.0052f2756.9463f10.8203f),
            new 
Vector3(1271.5452f2554.0227f10.8203f),
            new 
Vector3(1441.5894f2567.9099f10.8203f),
            new 
Vector3(1480.6473f2213.5718f11.0234f),
            new 
Vector3(1400.5906f2225.6960f11.0234f),
            new 
Vector3(1598.8419f2221.5676f11.0625f),
            new 
Vector3(1318.7759f1251.3580f10.8203f),
            new 
Vector3(1558.0731f1007.8292f10.8125f),
            
//new Vector3(-857.0551f, 1536.6832f, 22.5870f),   Out of Town Spawns
            //new Vector3(817.3494f, 856.5039f, 12.7891f),
            //new Vector3(116.9315f, 1110.1823f, 13.6094f),
            //new Vector3(-18.8529f, 1176.0159f, 19.5634f),
            //new Vector3(-315.0575f, 1774.0636f, 43.6406f),
            
new Vector3(1705.2347f1025.6808f10.8203f),
        }; 
Reply
#33

Quote:
Originally Posted by Romanius
Посмотреть сообщение
PHP код:
private Vector3[] playerSpawns = new Vector3[]
        {
            new 
Vector3(1958.3783f1343.1572f15.3746f),
            new 
Vector3(2199.6531f1393.3678f10.8203f),
            new 
Vector3(2483.5977f1222.0825f10.8203f),
            new 
Vector3(2637.2712f1129.2743f11.1797f),
            new 
Vector3(2000.0106f1521.1111f17.0625f),
            new 
Vector3(2024.8190f1917.9425f12.3386f),
            new 
Vector3(2261.9048f2035.9547f10.8203f),
            new 
Vector3(2262.0986f2398.6572f10.8203f),
            new 
Vector3(2244.2566f2523.7280f10.8203f),
            new 
Vector3(2335.3228f2786.4478f10.8203f),
            new 
Vector3(2150.0186f2734.2297f11.1763f),
            new 
Vector3(2158.0811f2797.5488f10.8203f),
            new 
Vector3(1969.8301f2722.8564f10.8203f),
            new 
Vector3(1652.0555f2709.4072f10.8265f),
            new 
Vector3(1564.0052f2756.9463f10.8203f),
            new 
Vector3(1271.5452f2554.0227f10.8203f),
            new 
Vector3(1441.5894f2567.9099f10.8203f),
            new 
Vector3(1480.6473f2213.5718f11.0234f),
            new 
Vector3(1400.5906f2225.6960f11.0234f),
            new 
Vector3(1598.8419f2221.5676f11.0625f),
            new 
Vector3(1318.7759f1251.3580f10.8203f),
            new 
Vector3(1558.0731f1007.8292f10.8125f),
            
//new Vector3(-857.0551f, 1536.6832f, 22.5870f),   Out of Town Spawns
            //new Vector3(817.3494f, 856.5039f, 12.7891f),
            //new Vector3(116.9315f, 1110.1823f, 13.6094f),
            //new Vector3(-18.8529f, 1176.0159f, 19.5634f),
            //new Vector3(-315.0575f, 1774.0636f, 43.6406f),
            
new Vector3(1705.2347f1025.6808f10.8203f),
        }; 
Class scope variables cannot currently be initialized in class scope (I haven't tested with the latest version 0.6). You are most likely getting a null pointer error due to this, initialize that array in your Load() method.
Reply
#34

Quote:
Originally Posted by Simon
Посмотреть сообщение
Class scope variables cannot currently be initialized in class scope (I haven't tested with the latest version 0.6). You are most likely getting a null pointer error due to this, initialize that array in your Load() method.
I'm aware of the problem, and I've not had chance to fix it yet. I'm not quite sure why it's happening to be honest, but I'll do some troubleshooting. Fortunately there are workarounds for now though
Reply
#35

Nice job hard working i dont know how u understant them
Reply
#36

private Vector3[] playerSpawns = new Vector3[]
An idea to fix the problem for Yasahiro
Don't bother to implement the vector. Simply use provided vector and point3d in .net library
http://msdn.microsoft.com/en-us/libr...d.point3d.aspx
Not only Point3d but lot's of other useful structures.
Reply
#37

Quote:
Originally Posted by samiras
Посмотреть сообщение
private Vector3[] playerSpawns = new Vector3[]
An idea to fix the problem for Yasahiro
Don't bother to implement the vector. Simply use provided vector and point3d in .net library
http://msdn.microsoft.com/en-us/libr...d.point3d.aspx
Not only Point3d but lot's of other useful structures.
Due to platform-dependant reasons I don't have access to the System.Windows.Media namespace. And then if I wanted to include a 2D point, I'd have to use the provided Point in the System.Drawing namespace. Not very organised.

But this has given me an idea to make separate classes for Size, Location and Rotation and whatnot.

Side-note to anyone:
After browsing the forum, I found another plugin that allows use of coloured text in the console log.
Would this be useful to implement into SAMP.NET?
You guys could just use
Код:
Console.ForegroundColor = ConsoleColor.Something
but that doesn't affect using the native logprintf(). And Console.Write() doesn't write to the log file which is annoying.
Reply
#38

Quote:
Originally Posted by Yasahiro
Посмотреть сообщение
Side-note to anyone:
After browsing the forum, I found another plugin that allows use of coloured text in the console log.
Would this be useful to implement into SAMP.NET?
You guys could just use
Код:
Console.ForegroundColor = ConsoleColor.Something
but that doesn't affect using the native logprintf(). And Console.Write() doesn't write to the log file which is annoying.
No. ......
Reply
#39

Quote:
Originally Posted by Romanius
Посмотреть сообщение
No. ......
+1
Never waste your time on such things... I would like to see full-working plugin before any additional feature..
I really need it man (I'm know you are working on this but maybe you dedicate more time)
If only you could port ALL of sa-mp functions in the OOP environment... Then I could start to write an open source game mode for dedicate on this plugin to show the power of this plugin to everybody.
Reply
#40

How can we help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)