Raised This Month: $32 Target: $400
 8% 

[TUT] Plugin API


Post New Thread Reply   
 
Thread Tools Display Modes
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 04-13-2008 , 10:55   Re: [TUT] Plugin API
Reply With Quote #31

"This is to let the AMXX core know that we want to send a floating point int to the functions called."

I was trying to point out your small error. I wouldn't have mentioned something so small if it didn't offer a trace of comedy value. Coming up next; immutable variables.
Lee is offline
Old 04-13-2008, 11:06
Hawk552
This message has been deleted by Hawk552.
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-13-2009 , 05:09   Re: [TUT] Plugin API
Reply With Quote #32

Can the PrepareArray function be used also for Float arrays?
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-13-2009 , 13:39   Re: [TUT] Plugin API
Reply With Quote #33

Quote:
Originally Posted by ot_207 View Post
Can the PrepareArray function be used also for Float arrays?
Since arrays tagged as floats are just that; tagged, you can prepare an array of any type. You might have to do some detagging, though, like this:

PHP Code:
// ...

new Float:origin[3]
pevidpev_originorigin )

new array = 
PrepareArray_:origin3)

ExecuteForwardsome_forwardsome_return, array )

// ...

public some_forward_nameFloat:origin[3] )
{
// ... 
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-14-2009 , 03:22   Re: [TUT] Plugin API
Reply With Quote #34

Quote:
Originally Posted by Hawk552 View Post
Since arrays tagged as floats are just that; tagged, you can prepare an array of any type. You might have to do some detagging, though, like this:

PHP Code:
// ...

new Float:origin[3]
pevidpev_originorigin )

new array = 
PrepareArray_:origin3)

ExecuteForwardsome_forwardsome_return, array )

// ...

public some_forward_nameFloat:origin[3] )
{
// ... 
Ok, thanks! At first I thought that it must be something like this.
But I needed someone to confirm it.
So basically the core just figures out the array cell length.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-14-2009 , 08:13   Re: [TUT] Plugin API
Reply With Quote #35

Quote:
Originally Posted by ot_207 View Post
Ok, thanks! At first I thought that it must be something like this.
But I needed someone to confirm it.
So basically the core just figures out the array cell length.
Float arrays are the exact same size as cell arrays because all they use are tags. There is no concept of data types in Pawn.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 04-21-2016 , 10:35   Re: [TUT] Plugin API
Reply With Quote #36

Is it possible to modify forward parameter value by other plugin?
__________________
youtube:
@holla16
11922911 is offline
11922911
Senior Member
Join Date: Dec 2011
Location: Yuen Long Country
Old 04-22-2016 , 23:42   Re: [TUT] Plugin API
Reply With Quote #37

Quote:
Originally Posted by 11922911 View Post
Is it possible to modify forward parameter value by other plugin?
I tried this
PHP Code:
forward test(&arg);

public 
test(&arg)
{
    
arg 369;

But it doesn't seems to work.
__________________
youtube:
@holla16
11922911 is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 02:22.


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