move clearchat feature to helpers

This commit is contained in:
Lorenc Pekaj 2018-09-13 04:03:16 +10:00
parent 21aeeed965
commit 60c098abd2
2 changed files with 10 additions and 7 deletions

View File

@ -1147,13 +1147,6 @@ stock UpdateInfoTextdrawsForPlayer(playerid)
return 1;
}
stock Player_Clearchat(playerid)
{
for(new j = 0; j < 30; j++)
SendClientMessage(playerid, -1, " ");
return 1;
}
public Poker_StartGame(handle, dealer)
{
TableData[handle][E_TABLE_STING_NEW_GAME] = false;

View File

@ -13,6 +13,7 @@
#define RandomEx(%0,%1) (random((%1) - (%0)) + (%0))
#define HOLDING(%0) ((newkeys & (%0)) == (%0))
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
#define SendUsage(%0,%1) (SendClientMessageFormatted(%0,-1,"{FFAF00}[USAGE]{FFFFFF} " # %1))
#define SendError(%0,%1) (SendClientMessageFormatted(%0,-1,"{F81414}[ERROR]{FFFFFF} " # %1))
#define SendServerMessage(%0,%1) (SendClientMessageFormatted(%0,-1,"{C0C0C0}[SERVER]{FFFFFF} " # %1))
@ -88,6 +89,15 @@ stock trimString( strSrc[ ] )
strdel( strSrc, 0, strPos );
}
// purpose: clear chat for player
stock Player_Clearchat( playerid )
{
for ( new j = 0; j < 30; j ++ ) {
SendClientMessage( playerid, -1, " " );
}
return 1;
}
// purpose: get distance between players
stock Float: GetDistanceBetweenPlayers( iPlayer1, iPlayer2, &Float: fDistance = Float: 0x7F800000, bool: bAllowNpc = false )
{