[Tutorial] How to make a Callback
#9

Quote:
Originally Posted by kacper55331
Посмотреть сообщение
I tried to do ProXdectory(GodFather) the plugin, but there is a need Float-type arguments.
Код:
// SendClienMessageEx(Float:radi, playerid, string[], col1, col2, col3, col4, col5, bool:echo=false)
int _SendClientMessageEx(float radi[], int playerid, char string[], int c1, int c2, int c3, int c4, int c5, int echo, AMX *amx)
{
    int index;
    if(amx_FindPublic(amx, "SendClientMessageEx", &index) == AMX_ERR_NONE)
    {
        cell retVal,
		amx_addr,
		amx_ret,
		* amx_physAddr;
		int numb;

		amx_Push(amx, echo);
		amx_Push(amx, c5);
		amx_Push(amx, c4);
		amx_Push(amx, c3);
		amx_Push(amx, c2);
		amx_Push(amx, c1);
		amx_PushString(amx, &amx_addr, &amx_physAddr, string, 0, 0);
		amx_Push(amx, playerid);
		amx_PushArray(amx, &amx_addr, &amx_physAddr, radi, 0);

		if(amx_Exec(amx, &retVal, &index) == AMX_ERR_NONE)
		{
				return true;
		} 
		else
		{
			amx_Release(amx, amx_addr);
			return false;
		}
        return true;
    }
    return false;
}
Did you try this?

Quote:
Originally Posted by 0x5A656578
Посмотреть сообщение
You can do floats with amx_ftoc

Код:
float some_float;
some_float = ...;
...
amx_Push(amx, amx_ftoc(some_float));
amx_Exec(...);
Perhaps give it a shot, and let us know?
Reply


Messages In This Thread
How to make a Callback - by Pghpunkid - 14.06.2011, 06:47
Re: How to make a Callback - by Raimis_R - 14.06.2011, 07:20
Re: How to make a Callback - by Lorenc_ - 14.06.2011, 07:35
Re: How to make a Callback - by kacper55331 - 14.06.2011, 08:13
Re: How to make a Callback - by Lorenc_ - 14.06.2011, 08:18
Re: How to make a Callback - by Pghpunkid - 14.06.2011, 08:31
Re: How to make a Callback - by 0x5A656578 - 14.06.2011, 10:19
Re: How to make a Callback - by kacper55331 - 14.06.2011, 11:32
Re: How to make a Callback - by Pghpunkid - 14.06.2011, 12:34
Re: How to make a Callback - by RyDeR` - 30.06.2011, 21:10
Re: How to make a Callback - by Omega-300 - 30.06.2011, 21:39
Re: How to make a Callback - by RyDeR` - 30.06.2011, 22:20
Re: How to make a Callback - by Kyosaur - 07.07.2011, 22:19
Re: How to make a Callback - by Gamer_Z - 08.07.2011, 09:26
Re: How to make a Callback - by RyDeR` - 08.07.2011, 09:46
Re: How to make a Callback - by Gamer_Z - 08.07.2011, 10:01
Re: How to make a Callback - by MovieDrifting - 06.12.2012, 16:35

Forum Jump:


Users browsing this thread: 1 Guest(s)