SA-MP Forums Archive
Airstrike - 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: Airstrike (/showthread.php?tid=71793)



Airstrike - CJ101 - 03.04.2009

http://pastebin.com/d4731a5f3

when i get in one of the planes, it acts like you cant use that plane to airstrike.

also, i have a cmd if you need to see that

Код:
	if(strcmp(cmdtext, "/strike1", true) == 0)
	{
	  if (GetPlayerSkin(playerid) == 287)
	  {
	    new vmodel = GetVehicleModel(playerid);
	    if (vmodel == 476 || vmodel == 519 || vmodel == 553)
	    {
	    //do strike here
			SetTimer("Strike",1000,false);
	    }
	    else
	    {
     	SendClientMessage(playerid,red,"[!] Not in a plane that can do airstrikes.");
	    }
	  }
	 	else
	 	{
    SendClientMessage(playerid,red,"Only Army Can Use Airstrike.");
		}

		return 1;
	}



Re: Airstrike - LarzI - 03.04.2009

Change both
pawn Код:
SetTimer("Strike",1000,false);
to
pawn Код:
SetTimerEx("Strike",1000,false, "i", playerid);



Re: Airstrike - CJ101 - 03.04.2009

that does not fx my problem


Re: Airstrike - LarzI - 04.04.2009

Not all of them, but some of the problems...

Change
pawn Код:
new vmodel = GetVehicleModel(playerid);
to
pawn Код:
new vmodel = GetVehicleModel(GetPlayerVehicleID(playerid));