Question about float
#1

well i use martok's firework script and i got a question about it.
is there a way so i can change the float's ?
it is about this part :
Код:
dcmd_fwspawn(playerid, params[])
{
 new c, id, Float:h, hv, Float:w, Float:in;
 if (sscanf(params, "ififf",c,h,hv,w,in)) {
   SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /fwspawn {COUNT} {HEIGHT} {HVAR} {WINDSPEED} {INTERVAL}");
   SendClientMessage(playerid, 0xFFFFFFFF, "Example: /fwspawn 20 50.0 20 30.0 1.0");
 }
 else {
    id = findempty();
    if (id<0) SendClientMessage(playerid, 0xFFFFFFFF, "No free slot!");
    else {
  	  new Float:x, Float:y, Float:z, Float:a;
  	  GetPlayerPos(playerid,x,y,z);
  	  GetPlayerFacingAngle(playerid,a);
	    GetXYInFrontOfPosition(x,y,a,1.0);
	    batteries[id][pos][0] = x;
	    batteries[id][pos][1] = y;
	    batteries[id][pos][2] = z;
	    batteries[id][count] = c;
	    batteries[id][height] = h;
	    batteries[id][hvar] = hv;
	    batteries[id][windspeed] = w;
	    batteries[id][interval] = in;

	    batteries[id][inuse] = true;
      batteries[id][machine] = CreateObject(2780,x,y,z,0.0,0.0,0.0);
      new tmp[256];
      format(tmp,sizeof(tmp),"Machine created. Slot: %d", id);
      SendClientMessage(playerid, 0x55FF55FF, tmp);
    }
 }
 return 1;
}
i am combining it with a other script that also uses float.
how to solve this? cause when i launch the fireworks, the fireworks don't get the height what i say, or the won't fire at all :S
thanks
Reply
#2

U can change the floats ig. Worked for me perfect, only cant do this with alot of rockets. crashing server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)