12.11.2010, 10:30
Can someone please make a command, Like: When i type: /Haha (or whatever), and after 15 secounds should the player exploade like you see the smoke too
if(!strcmp("/haha",cmdtext,true))
{
SetTimerEx("boom",15000,0,"i",playerid);
}
forward boom(playerid);
public boom(playerid)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateExplosion(X,Y,Z,0,4.0);
CreateExplosion(X,Y,Z,1,4.0);
CreateExplosion(X,Y,Z,2,4.0);
CreateExplosion(X,Y,Z,3,4.0);
CreateExplosion(X,Y,Z,4,4.0);
CreateExplosion(X,Y,Z,5,4.0);
CreateExplosion(X,Y,Z,6,4.0);
CreateExplosion(X,Y,Z,7,4.0);
CreateExplosion(X,Y,Z,10,4.0);
CreateExplosion(X,Y,Z,11,4.0);
CreateExplosion(X,Y,Z,12,4.0);
CreateExplosion(X,Y,Z+2,0,4.0);
CreateExplosion(X,Y,Z+2,1,4.0);
CreateExplosion(X,Y,Z+2,2,4.0);
CreateExplosion(X,Y,Z+2,3,4.0);
CreateExplosion(X,Y,Z+2,4,4.0);
CreateExplosion(X,Y,Z+2,5,4.0);
CreateExplosion(X,Y,Z+2,6,4.0);
CreateExplosion(X,Y,Z+2,7,4.0);
CreateExplosion(X,Y,Z+2,10,4.0);
CreateExplosion(X,Y,Z+2,11,4.0);
CreateExplosion(X,Y,Z+2,12,4.0);
SendClientMessage(playerid,GREEN,"You expldoded xDDD");
return 1;
}
pawn Код:
|
#include <a_samp>
#define GREEN 0x33AA33AA
forward boom(playerid);
public OnFilterScriptInit()
{
print("\n-----------------------------------------");
print(" Bomb By [ISS]jumbo");
print("-------------------------------------------\n");
}
if(!strcmp("/haha",cmdtext,true))
{
SetTimerEx("boom",15000,0,"i",playerid);
}
public boom(playerid)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateExplosion(X,Y,Z,0,4.0);
CreateExplosion(X,Y,Z,1,4.0);
CreateExplosion(X,Y,Z,2,4.0);
CreateExplosion(X,Y,Z,3,4.0);
CreateExplosion(X,Y,Z,4,4.0);
CreateExplosion(X,Y,Z,5,4.0);
CreateExplosion(X,Y,Z,6,4.0);
CreateExplosion(X,Y,Z,7,4.0);
CreateExplosion(X,Y,Z,10,4.0);
CreateExplosion(X,Y,Z,11,4.0);
CreateExplosion(X,Y,Z,12,4.0);
CreateExplosion(X,Y,Z+2,0,4.0);
CreateExplosion(X,Y,Z+2,1,4.0);
CreateExplosion(X,Y,Z+2,2,4.0);
CreateExplosion(X,Y,Z+2,3,4.0);
CreateExplosion(X,Y,Z+2,4,4.0);
CreateExplosion(X,Y,Z+2,5,4.0);
CreateExplosion(X,Y,Z+2,6,4.0);
CreateExplosion(X,Y,Z+2,7,4.0);
CreateExplosion(X,Y,Z+2,10,4.0);
CreateExplosion(X,Y,Z+2,11,4.0);
CreateExplosion(X,Y,Z+2,12,4.0);
SendClientMessage(playerid,GREEN,"You expldoded xD");
return 1;
}
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\Bomb.pwn(17) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/haha",cmdtext,true))
{
SetTimerEx("boom",15000,0,"i",playerid);
return 1;
}
return 0;
}