SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 10/03/2013, 04:53 AM   #21
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 863
Reputation: 52
Default Re: Gamemode SDK for C/C++ (GDK)

Very usefull plugin, I'm not expert and I won't say anything about speed or something like comments above, only thing I know I would not use any plugin in next gm that im about to create Nice plugin, really nice plugin...
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Help me! How to fix error
CoaPsyFactor is offline   Reply With Quote
Old 10/03/2013, 08:20 AM   #22
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 320
Reputation: 382
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by Hoda View Post
Zeex, Not important but I tough let you know a simple bug in the plugin.
You have misspelled weaponid with weaponslot in SetPlayerAmmo



Which should be :



I wanted to do a commit to GitHub but since this won't make a difference I leave this to you and your wish

EDIT : Ahh after saw a_players.inc provided with latest version of server I found out this was not your fault but Kalkor
I have reported this as a bug so he can fix it in next versions
EDIT 2: Wiki : http://wiki.sa-mp.com/wiki/SetPlayerAmmo
Thanks, fixed.
xeeZ is offline   Reply With Quote
Old 11/03/2013, 02:12 PM   #23
Hoda
Little Clucker
 
Join Date: Mar 2013
Posts: 24
Reputation: 4
Default Re: Gamemode SDK for C/C++ (GDK)

Zeex I see a_npc include is missing in the plugin so can't use StartRecordingPlayback.
Was it's implementing impossible or what ?
Hoda is offline   Reply With Quote
Old 11/03/2013, 04:04 PM   #24
Hoda
Little Clucker
 
Join Date: Mar 2013
Posts: 24
Reputation: 4
Default Re: Gamemode SDK for C/C++ (GDK)

I bet he have forgot to add these for sure.

OnPlayerClickTextDraw
OnPlayerClickPlayerTextDraw

Zeex can you fix it please ?
Hoda is offline   Reply With Quote
Old 13/03/2013, 09:27 AM   #25
Hoda
Little Clucker
 
Join Date: Mar 2013
Posts: 24
Reputation: 4
Default Re: Gamemode SDK for C/C++ (GDK)

Zeex beside these :

OnPlayerClickTextDraw
OnPlayerClickPlayerTextDraw


I guess you have made a mistake with SetPVarFloat And GetPVarFloat. Are you casting wrongly ?
I do SetPVarFloat to a value like 4.5 but when I get it it's some value between 1 and 2.
Hoda is offline   Reply With Quote
Old 13/03/2013, 11:03 AM   #26
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 320
Reputation: 382
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by Hoda View Post
Zeex beside these :

OnPlayerClickTextDraw
OnPlayerClickPlayerTextDraw


I guess you have made a mistake with SetPVarFloat And GetPVarFloat. Are you casting wrongly ?
I do SetPVarFloat to a value like 4.5 but when I get it it's some value between 1 and 2.
I've fixed both, thanks.
xeeZ is offline   Reply With Quote
Old 18/03/2013, 04:05 PM   #27
Shadmehr
Little Clucker
 
Join Date: Mar 2013
Posts: 1
Reputation: 0
Default Re: Gamemode SDK for C/C++ (GDK)

Zeex can you please tell me which compiler you used for the official package ?

This is a CMake or sampgdk bug.
Here is exactly what I did and repeated it like 7-9 times !
Used CMake and configured as VS 2010.
Made only INSTALL package.
Compiled sampgdk with no error or warning. [I also didn't modify code]
Now compiled my plugin with the generated lib.
Copied generated dll to samp folder.
Ran server.
Crashed.
Now without recompiling or anything else I just copied gdk dll from the official package which has been installed in my program files to server folder.
Replaced that with my own compiled dll.
Ran server without crash.
Aditional information :
This happens in the following code :

pawn Code:
PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppData) {
        lvdm.Load(ppData); // This line cause the crash with my compiled dll
Shadmehr is offline   Reply With Quote
Old 18/03/2013, 07:57 PM   #28
Dan..
Gangsta
 
Join Date: Jun 2012
Location: Galati, Romania
Posts: 521
Reputation: 122
Default Re: Gamemode SDK for C/C++ (GDK)

Quote:
Originally Posted by klklt0 View Post
The processing speed on the server is slower than using pawn.
It actually might be faster.
Dan.. is offline   Reply With Quote
Old 19/03/2013, 04:04 PM   #29
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 320
Reputation: 382
Default Re: Gamemode SDK for C/C++ (GDK)

GDK 3.2.1 is released!
  • Fixed functions returning a float giving wrong result
  • Fixed the type of the mode parameter of ShowPlayerMarkers()
  • Added two missing callbacks that were introduced in SA-MP 0.3e

    Code:
      bool OnPlayerClickTextDraw(int playerid, int clickedid);
      bool OnPlayerClickPlayerTextDraw(int playerid, int playertextid);
  • Renamed the weaponslot parameter of SetPlayerAmmo() to weaponid

Last edited by xeeZ; 05/04/2013 at 10:44 PM.
xeeZ is offline   Reply With Quote
Old 20/03/2013, 03:37 PM   #30
AndreT
Gangsta
 
AndreT's Avatar
 
Join Date: Jul 2011
Posts: 966
Reputation: 413
Default Re: Gamemode SDK for C/C++ (GDK)

Thank you for returning and bringing your awesome creation with you, Zeex!

I have done some basic tests in the past, and yes, the speed gain from simple data access and arithmetic operations (just for example) is a lot bigger than the loss from having to call the native functions through PAWN (if this still works like that). I won't bring any numbers in as my tests may be flawed and all sorts of numbers seem to receive a lot of heat lately

How does calling functions from other plugins work? I've done a bit reading on this subject but I assume there's no really easy way to go?
AndreT is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gamemode is unknown. When i connect theres no gamemode. Shannon_Brown Server Support 11 09/09/2012 08:49 AM
[GameMode] Brasil Drift Show [BDS] - Primeiro GameMode vitorzero3um PortuguÍs/Portuguese 3 29/02/2012 06:48 PM
[ENG] Ideas for new GameMode [NL] Ideeen voor nieuwe Gamemode Xtreme-Nicole Everything and Nothing 10 10/07/2011 11:20 AM
[ENG] Ideas for new GameMode [NL] Ideeen voor nieuwe GameMode Xtreme-Nicole Help Archive 2 09/07/2011 11:24 AM


All times are GMT. The time now is 02:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.