forward CreatePlayerExplosion(playerid);
public CreatePlayerExplosion(playerid)
{
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
CreateExplosion(Pos[0],Pos[1],Pos[2],6,15.0);
return 1;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/bomb",true))//replace it with your Command
{
SetTimerEx("CreatePlayerExplosion",1000*5,false,"d",playerid);
SendClientMessage(playerid,0xFF0000FF,"AREA IS GOING TO BLOW IN 5 SECONDS!!!");
return 1;
}
return 0;
}
forward CreatePlayerExplosion( playerid, &Float:x, &Float:y, &Float:z );
public CreatePlayerExplosion( playerid, &Float:x, &Float:y, &Float:z )
{
CreateExplosion( Float:x, Float:y, Float:z, 6, 15.0 );
return true;
}
public OnPlayerCommandText( playerid,cmdtext[] )
{
if ( !strcmp ( cmdtext, "/bomb", true ) )
{
new
Float: P[ 3 ];
GetPlayerPos( playerid, P[ 0 ], P[ 1 ], P[ 2 ] );
SetTimerEx( "CreatePlayerExplosion", 5000, false, "dfff", playerid, P[ 0 ], P[ 1 ], P[ 2 ] );
SendClientMessage( playerid, -1,"Area is going to blow in 5 seconds" );
return true;
}
return false;
}
pawn Код:
|
// top of script
new Float: BombX;
new Float: BombY;
new Float: BombZ;
// onplayercommandtext
if(!strcmp (cmdtext, "/bomb", true, 5))
{
GetPlayerPos(playerid,BombX,BombY,BombZ);
SetTimerEx("CreatePlayerExplosion",5000,false,"dfff",playerid,BombX,BombY,BombZ);
SendClientMessage(playerid, -1,"Bomb Planted ... The Area Will Explode In 5 Seconds!");
return 1;
}
// bottom of script
forward CreatePlayerExplosion(playerid, &Float:x, &Float:y, &Float:z);
public CreatePlayerExplosion(playerid, &Float:x, &Float:y, &Float:z)
{
CreateExplosion(Float:x, Float:y, Float:z, 6, 15.0);
return 1;
}
// top of script
new Float: BombX;
new Float: BombY;
new Float: BombZ;
// onplayercommandtext
if(!strcmp (cmdtext, "/bomb", true, 5))
{
GetPlayerPos(playerid,BombX,BombY,BombZ);
SetTimerEx("CreatePlayerExplosion",5000,false,"dfff",playerid,BombX,BombY,BombZ);
SendClientMessage(playerid, -1,"Bomb Planted ... The Area Will Explode In 5 Seconds!");
return 1;
}
// bottom of script
forward CreatePlayerExplosion(playerid);
public CreatePlayerExplosion(playerid)
{
CreateExplosion(BombX,BombY,BombZ,6,15);
return 1;
}