07.05.2011, 20:20
Exemplo Simples :
pawn Код:
new JFS[MAX_PLAYERS];
new JFS1;
if(!strcmp(cmd,"/bomba",true))
{
if(PlayerInfo[playerid][pMember] == 8)
{
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // anim
JFS1 = CreateDynamicObject(1654,x+1,y,z-0.8,0,0,0); // a Bomba Irб Criar ( OBJETO )
SendClientMessage(playerid,COLOR_YELLOW,"Vocк armou a bomba: Use o botгo de atirar para detona-la");
}
return true;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
new Float:X,Float:Y,Float:Z,tipo,Float:JFS2;
CreateExplosion(X,Y,Z,10,JFS2);
CreateExplosion(X+2,Y+2,Z+2,10, JFS2);
CreateExplosion(X+3,Y+3,Z+3,10, JFS2);
DestroyDynamicObject(JFS1);
SendClientMessage(playerid,COLOR_YELLOW," DETONADA !");
}
return true;
}