Quote:
Originally Posted by SmiT
pawn Код:
if ( !strcmp( "/cannonfire", cmdtext, true, 10 ) ) { if( GetPlayerMoney(playerid) < 10000 ) return SendClientMessage( playerid, 0xFF0000FF, "You dont have Enough Money For a Cannon Strike" ); SendClientMessage( playerid, 0x00FF00FF, "Cannon fire on your position in 6 Seconds and counting!" ); GivePlayerMoney( playerid, -10000 ); SetTimerEx( "CannonExplosion", 6000, false, "i", playerid ); return true; } forward CannonExplosion(playerid); public CannonExplosion(playerid) { new Float: P[ 3 ]; GetPlayerPos( playerid, P[ 0 ], P[ 1 ], P[ 2 ] ); CreateExplosion( P[ 0 ] + random( 5 ), P[ 1 ] + random( 5 ), P[ 2 ] + random( 5 ), 6, 100.0 ); }
|
do you know this part
pawn Код:
forward CannonExplosion(playerid);
public CannonExplosion(playerid)
{
new
Float: P[ 3 ];
GetPlayerPos( playerid, P[ 0 ], P[ 1 ], P[ 2 ] );
CreateExplosion( P[ 0 ] + random( 5 ), P[ 1 ] + random( 5 ), P[ 2 ] + random( 5 ), 6, 100.0 );
}
Will not be inside OnPlayerCommandText Place it outside a function anywhere in ur script