command help
#4

Try like this
pawn Код:
if ( !strcmp( "/cannonfire", cmdtext, true, 10 ) )
 {
   if(  GetPlayerMoney(playerid) < 10000 ) return SendClientMessage( playerid, 0xFF0000FF, "You dont have Enough Money For a Cannon Strike" );
    else
   {
         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 );
}
Reply


Messages In This Thread
command help - by jiwan - 20.10.2011, 14:34
Re: command help - by SmiT - 20.10.2011, 14:50
Re: command help - by jiwan - 20.10.2011, 15:21
Re: command help - by nilanjay - 20.10.2011, 17:01
Re: command help - by jiwan - 21.10.2011, 04:26
Re: command help - by spd_sahil - 21.10.2011, 04:50
Re: command help - by jiwan - 21.10.2011, 05:02
Re: command help - by spd_sahil - 28.10.2011, 04:58

Forum Jump:


Users browsing this thread: 1 Guest(s)