PHP код:
new Float: C4Pos[3], C4 = 0;
forward C4Plant(playerid);
public C4Plant(playerid){
GetPlayerFacingPoint(playerid,C4Pos[0],C4Pos[1],C4Pos[2],0.2);
C4 = CreateObject(1252,C4Pos[0],C4Pos[1],C4Pos[2]-0.8,0.0,0.0,0.0);
Message(playerid,"Бомба заложена! Наберите еще раз /c4 чтобы ее взорвать",clOrange);
}
C4Exp(){
new Float: rx, Float: ry, Float: rz;
GetObjectPos(C4,C4Pos[0],C4Pos[1],C4Pos[2]);
for(new i=0; i<16; i++){
rx = C4Pos[0] - 6.0 + random(12);
ry = C4Pos[1] - 6.0 + random(12);
rz = C4Pos[2] - 6.0 + random(12);
CreateExplosion(rx,ry,rz,6+random(1),16.0);
CreateExplosion(rx,ry,rz+20,6+random(1),16.0);
CreateExplosion(rx+20,ry+20,rz,6+random(1),16.0);
CreateExplosion(rx-20,ry-20,rz,6+random(1),16.0);
CreateExplosion(rx+20,ry,rz,6+random(1),16.0);
CreateExplosion(rx,ry+20,rz,6+random(1),16.0);
CreateExplosion(rx+30,ry+30,rz+20,6+random(1),16.0);
CreateExplosion(rx,ry,rz+40,6+random(1),16.0);
CreateExplosion(rx+40,ry+40,rz,6+random(1),16.0);
CreateExplosion(rx-40,ry-40,rz,6+random(1),16.0);
CreateExplosion(rx+40,ry,rz,6+random(1),16.0);
CreateExplosion(rx,ry+40,rz,6+random(1),16.0);
CreateExplosion(rx+50,ry+50,rz+50,6+random(1),16.0);
CreateExplosion(rx,ry,rz+20,6+random(1),16.0);
CreateExplosion(rx,ry,rz+40,6+random(1),16.0);
CreateExplosion(rx+20,ry+20,rz+20,6+random(1),16.0);
CreateExplosion(rx-20,ry-20,rz+20,6+random(1),16.0);
CreateExplosion(rx+20,ry,rz+20,6+random(1),16.0);
CreateExplosion(rx,ry+20,rz+20,6+random(1),16.0);
CreateExplosion(rx+30,ry+50,rz+20,6+random(1),16.0);
CreateExplosion(rx,ry,rz+60,6+random(1),16.0);
CreateExplosion(rx+40,ry+40,rz+20,6+random(1),16.0);
CreateExplosion(rx-40,ry-40,rz+20,6+random(1),16.0);
CreateExplosion(rx+40,ry,rz+20,6+random(1),16.0);
CreateExplosion(rx,ry+40,rz+20,6+random(1),16.0);
CreateExplosion(rx+50,ry+50,rz+70,6+random(1),16.0);
}
DestroyObject(C4);
C4 = 0;
}
if(iscmd(cmd,"/c4")){
if(PlayerC4[playerid]==0 && C4) C4Exp();
else if(PlayerC4[playerid]==1){
GetPlayerPos(playerid,C4Pos[0],C4Pos[1],C4Pos[2]);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("C4Plant",2000,0,"%i",playerid);
PlayerC4[playerid] = 0;
} else {
Message(playerid,"У вас нет взрывчатки",clDarkRed);
return 1;
}
return 1;
}
if(iscmd(cmd,"/giveme")){
if(PlayerC4[playerid]==1 && C4) C4Exp();
else if(PlayerC4[playerid]==0){
PlayerC4[playerid] = 1;
} else {
Message(playerid,"У вас нет взрывчатки",clDarkRed);
return 1;
}
return 1;
}
Изменения в скрипте не на уровне профи, их может сделать практически любой начинающий скриптер.