SA-MP Forums Archive
Will this work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Will this work? (/showthread.php?tid=79325)



Will this work? - JoeDaDude - 27.05.2009

Ok im adding a robbery faction for my rp,
And im adding a bridge able to blow up,
And there is 3 pickup`s, When u walk to them,
You can say /plantc4, And it will set off a timer for 30 seconds,
After that 30 seconds is up, BOOM, So im wondering will this code work,

pawn Код:
if(!strcmp(cmdtext, "/plantc4", true))
  {
    SetTimer("C4",30000,false);
    return 1;
  }

public C4()
{
    CreateExplosion( x, y ,z, type, float:radius);
}
Will that work? I obviously will change the X, Y, Z, Type And Radius,
I have forwarded it also,


Re: Will this work? - NigNog1 - 27.05.2009

Yep


Re: Will this work? - JoeDaDude - 27.05.2009

Quote:
Originally Posted by Stevelo
Yep
Its not working


Re: Will this work? - lol2112 - 27.05.2009

From what you've given us...there's no reason why it shouldn't work. Have you forwarded public C4? Are you putting the values of x, y, and z in as floats?

Код:
forward C4(x, y, z); //at the top of your script

if(!strcmp(cmdtext, "/plantc4", true))
  {
    new Float: x, Float: y, Float: z;
    GetPlayerPos(playerid, x, y, z); 
    SetTimerEx("C4",30000,false,"fff", x, y, z);
    return 1;
  }

public C4(x, y, z)
{
    CreateExplosion( x, y ,z, type, float:radius);
}
Maybe try something like that?