forward Kaboom();
if (strcmp(cmdtext, "/kaboom", true, 7) == 0)
{
SetTimer("kaboom", 1000, true);
format(string, sizeof(string), "** %s To Dispatch: FIRE REPORTED AT CITYHALL **", sendername);
SendRadioMessage(1, COLOR_BLUE, string);
SendRadioMessage(2, COLOR_BLUE, string);
SendRadioMessage(3, COLOR_BLUE, string);
SendRadioMessage(4, COLOR_BLUE, string);
return 1;
}
public Kaboom()
{
CreateExplosion(1485.4962,-1744.5206,13.5469,1,5);
return 1;
}
|
Originally Posted by bristan
im trying to make explsion happen at ls city hall very few secs this is what i got but it don't work the way it should
Код:
forward Kaboom(); Код:
if (!strcmp(cmdtext, "/kaboom", true)
{
SetTimer("Kaboom", 1000, true);
format(string, sizeof(string), "** %s To Dispatch: FIRE REPORTED AT CITYHALL **", sendername);
SendRadioMessage(1, COLOR_BLUE, string);
SendRadioMessage(2, COLOR_BLUE, string);
SendRadioMessage(3, COLOR_BLUE, string);
SendRadioMessage(4, COLOR_BLUE, string);
return 1;
}
Код:
public Kaboom()
{
CreateExplosion(1485.4962,-1744.5206,13.5469,1,5);
return 1;
}
|
(33362) : error 001: expected token: ")", but found "{"
if (!strcmp(cmdtext, "/kaboom", true)
line 33362 > {
SetTimer("Kaboom", 1000, true);
format(string, sizeof(string), "** %s To Dispatch: FIRE REPORTED AT CITYHALL **", sendername);
SendRadioMessage(1, COLOR_BLUE, string);
SendRadioMessage(2, COLOR_BLUE, string);
SendRadioMessage(3, COLOR_BLUE, string);
SendRadioMessage(4, COLOR_BLUE, string);
return 1;
}
forward Kaboom();
new boomTimes = 0;
new timerkiller;
#define DISTANCE_FROM_CENTER_MAX 30
#define AMOUNT_OF_BOOMS 10 //Change this to the amount of booms you want
if (!strcmp(cmdtext, "/kaboom", true)
{
timerkiller = SetTimer("Kaboom", 1000, true);
format(string, sizeof(string), "** %s To Dispatch: FIRE REPORTED AT CITYHALL **", sendername);
SendRadioMessage(1, COLOR_BLUE, string);
SendRadioMessage(2, COLOR_BLUE, string);
SendRadioMessage(3, COLOR_BLUE, string);
SendRadioMessage(4, COLOR_BLUE, string);
return 1;
}
public Kaboom()
{
if(boomTimes >= AMOUNT_OF_BOOMS) {
boomTimes = 0;
KillTimer(timerkiller);
return 1;
}
CreateExplosion(1485.4962 + random(DISTANCE_FROM_CENTER_MAX),-1744.5206 + random(DISTANCE_FROM_CENTER_MAX) ,13.5469 + random(DISTANCE_FROM_CENTER_MAX) ,1,5);
boomTimes++;
return 1;
}
|
Originally Posted by bristan
yea might be a good idea to have a way to stop it as well lol
ok i did what u fixed and now i got this lol Код:
(33362) : error 001: expected token: ")", but found "{"
Код:
if (!strcmp(cmdtext, "/kaboom", true)
line 33362 > {
SetTimer("Kaboom", 1000, true);
format(string, sizeof(string), "** %s To Dispatch: FIRE REPORTED AT CITYHALL **", sendername);
SendRadioMessage(1, COLOR_BLUE, string);
SendRadioMessage(2, COLOR_BLUE, string);
SendRadioMessage(3, COLOR_BLUE, string);
SendRadioMessage(4, COLOR_BLUE, string);
return 1;
}
|
if (!strcmp(cmdtext, "/kaboom", true)
if (!strcmp(cmdtext, "/kaboom", true))