AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   c++ structures vs pawn (https://forums.alliedmods.net/showthread.php?t=101381)

akuku 08-23-2009 10:52

c++ structures vs pawn
 
Heya, Im new in pawn development, but know something about C++ language.
And my questions goes here. I want to write a plugin that shows to player its stats on each round end, but dunno how to do it.

I wanted to create my struture (in c++ its possible, thats why im asking about this topic here) and create as many object of the structure as is players logged atm. And store the reference of each object in a array.

Is this possible in pawn?
If yes, i would be thankfull if someone wrote short code with strut implementation and creating an array to store objects.
If no, what can I do to realize this subject.

Thx in advance.

Arkshine 08-23-2009 11:07

Re: c++ structures vs pawn
 
I don't know much c++ but you can't do like in C++ ; though you can do something :

Code:
enum MyEnum {     MyInt,     bool:MyBool,     Float:MyFloat,     MyArray[3] } new Data[ MyEnum ];

Edit : There is a tuto here : http://forums.alliedmods.net/showthread.php?t=26634

akuku 08-23-2009 11:11

Re: c++ structures vs pawn
 
sounds great, thats what i wanted to know ;* thx mate


All times are GMT -4. The time now is 15:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.