AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   recreating from c++ in pawn (https://forums.alliedmods.net/showthread.php?t=64975)

hip_hop_x 12-28-2007 19:31

recreating from c++ in pawn
 
I was wondering if it's possible transforming the bellow message from c++ to pawn? There must be a way, but how?
Just found this message function in the esf dll, and I wanted to know how to convert it in pawn.
Code:

int CHudExplosion::MsgFunc_Explosion(const char *pszName,  int iSize, void *pbuf )
{        BEGIN_READ( pbuf, iSize );
        vec3_t vecMiddle;
        vecMiddle.x = READ_COORD();
        vecMiddle.y = READ_COORD();
        vecMiddle.z = READ_COORD();
        int radius = READ_LONG();
        char r = READ_CHAR();
        char g = READ_CHAR();
        char b = READ_CHAR();
        char a = READ_CHAR();
        AddExplosion(vecMiddle, radius, r, g, b, a);
        return 1;
}


Drak 12-28-2007 21:29

Re: recreating from c++ in pawn
 
Well.. That's a Message Hook. Which, that should be client-side code. Since a server-side message would be sent to the client, and that function would handle it.

hip_hop_x 12-30-2007 13:47

Re: recreating from c++ in pawn
 
thanks for info, I found some things, and I'll try to recreate them in amxmodx as a stock.


All times are GMT -4. The time now is 11:04.

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