28.12.2017, 02:09
You should read the wiki, there says clearly:
The Kick/Ban function must be called with a delay just after the SendClientMessage function, that's how SA-MP works in this case.
On the other hand, the code from your command is really bad in terms of optimization. You should go through all this:
https://sampforum.blast.hk/showthread.php?tid=646264
Alright, here you have something else: doing hours * 24 doesn't return days! You must do hours/24 and round the result because that might be a float:
Quote:
Originally Posted by SA-MP Wiki
As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban.
|
PHP код:
#define FixedBan(%0) SetTimerEx("myFixedBan",250,false,"d",%0)
forward myFixedBan(playerid);
public myFixedBan(playerid)
{
Ban(playerid);
}
// Usage:
FixedBan(playerid);
https://sampforum.blast.hk/showthread.php?tid=646264
Alright, here you have something else: doing hours * 24 doesn't return days! You must do hours/24 and round the result because that might be a float:
PHP код:
new zile = floatround(float(ore)/24.0);