10.11.2009, 10:33
me too
i got a little probleme
i tried this in my plugin
my function looks good
now this is my pawn code
ok my function is Test()
and it calls the callback "OnClientConnect(clients)"
so clients must be 2 as you see here "int clients = 2;"
but it always print "22 clients" for me even if i change "int clients = 3;"
what is the probleme here ?
thx
i got a little probleme
i tried this in my plugin
Код:
int clients = 2; if(amx_FindPublic(amx, "OnClientConnect", &clients) == AMX_ERR_NONE) { amx_Push(amx, clients); amx_Exec(amx, &amx_ret, clients); amx_Release(amx, amx_addr); } else { logprintf("there is a probleme"); } return 1;
now this is my pawn code
pawn Код:
}
public OnRconCommand(cmd[])
{
if(strcmp(cmd, "test", true) == 0)
{
Test();
return 1;
}
return 1;
}
public OnClientConnect(clients)
{
printf("%d clients", clients);
if(clients == 1)
{
printf("the first client");
}
else if(clients == 2)
{
print("the second one");
}
}
and it calls the callback "OnClientConnect(clients)"
so clients must be 2 as you see here "int clients = 2;"
but it always print "22 clients" for me even if i change "int clients = 3;"
what is the probleme here ?
thx