SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 08/03/2013, 10:32 PM   #21
nGen.SoNNy
Gangsta
 
nGen.SoNNy's Avatar
 
Join Date: Sep 2009
Location: Romania
Posts: 990
Reputation: 61
Default Re: Gamemode SDK for C/C++ (GDK)

I think I will try to understand all the plugin and the script... btw.. Are u the creator of the ZCMD?
__________________
If i've helped you, please click
nGen.SoNNy is offline   Reply With Quote
Old 08/03/2013, 11:13 PM   #22
Hoda
Little Clucker
 
Join Date: Mar 2013
Posts: 24
Reputation: 4
Default Re: Gamemode SDK for C/C++ (GDK)

Zeex, Not important but I tough let you know a simple bug in the plugin.
You have misspelled weaponid with weaponslot in SetPlayerAmmo

Quote:
SAMPGDK_NATIVE_EXPORT bool SAMPGDK_NATIVE_CALL sampgdk_SetPlayerAmmo(int playerid, int weaponslot, int ammo);
Which should be :
Quote:
SAMPGDK_NATIVE_EXPORT bool SAMPGDK_NATIVE_CALL sampgdk_SetPlayerAmmo(int playerid, int weaponid, int ammo);

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
Hoda is offline   Reply With Quote
Old 10/03/2013, 04:53 AM   #23
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 866
Reputation: 47
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   #24
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 321
Reputation: 380
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   #25
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, 02:22 PM   #26
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,524
Reputation: 2876
Default Re: Gamemode SDK for C/C++ (GDK)

a_npc is an include for NPC modes, not for gamemodes.

Last edited by Y_Less; 11/03/2013 at 04:07 PM.
Y_Less is offline   Reply With Quote
Old 11/03/2013, 04:04 PM   #27
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 11/03/2013, 04:07 PM   #28
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,524
Reputation: 2876
Default Re: Gamemode SDK for C/C++ (GDK)

In response to this comment sent in private:

Quote:
thanks however not so clear to me why can't we have it in the sampgdk
This is because gamemodes are run by the server, as plugins are; however, NPC modes are run by a separate process (samp-npc) which does not have plugins. Things like the a_npc PAWN native functions are only defined in that program and not in the main server, so there is no way to call them*.

* That's not strictly true, there are actually two ways I can think of to do this:

1) Call the functions remotely as SA:MP natives used to be called from plugins. Send a command to an NPC using something like "SendClientMessage" and parse that request within an NPC mode to call the relevant native from a compiled NPC mode.

2) "#pragma library". There is a way to force the loading of PAWN plugins using this directive which MAY work on NPC modes; however, these are NOT SA:MP plugins so the standard SA:MP SDK will not compile them and I don't know what the required format actually is. As far as I know, this is an old feature of PAWN itself and there was some work towards using these being done, but it was abandoned after SA:MP got its own plugins. I suggest consulting the PAWN documentation and source for more information. I do know that doing:

Code:
#pragma library moop

Will attempt to load a file called "moop.dll" or "moop.so", but I have NO clue as to what exports this file is expected to have.

Edit: http://code.google.com/p/pawnscript/...runk/amx/amx.c

The file it loads is actually called "amxmoop.dll" and needs an external function called "amx_moopInit" that takes an "AMX *" as the only parameter.

Hoda: It's on github, why not issue a pull request?

Last edited by Y_Less; 11/03/2013 at 06:28 PM.
Y_Less is offline   Reply With Quote
Old 13/03/2013, 09:27 AM   #29
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   #30
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 321
Reputation: 380
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
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 08:55 PM.


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