Problem with /sendstrike - 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)
+--- Thread: Problem with /sendstrike (
/showthread.php?tid=363865)
Problem with /sendstrike -
McFellow - 28.07.2012
My /sendstrike isn't working good because you need to go to the base to do /sendstrike and I tried to change it but nothing happend can some one change it so you can use it in LS,LV and SF? (+rep who helps me)
pawn Код:
CMD:sendstrike(playerid, params[])
{
if(sscanf(params, "fffd", posstrike[0], posstrike[1], posstrike[2])) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sendstrike [X Coordinate] [Y Coordinate] [Z Coordinate]");
if(IsPlayerInRangeOfPoint(playerid, 40, -370.26,2979.20,48.85))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " A Mortar Strike is En-Route to the Target Coordinates from Demorgan( 12 Seconds ) ");
SetTimer("StrikeTime", 12000, 0);
SetTimer("StrikeTimeWarning", 9000, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 422.130493,-2235.775146,20.270313))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " A Mortar Strike is En-Route to the Target Coordinates from the Carrier ( 10 Seconds ) ");
SetTimer("StrikeTime", 10000, 0);
SetTimer("StrikeTimeWarning", 7000, 0);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You are not in-range of the Altillery Control ");
}
return 1;
}
Re: Problem with /sendstrike -
Alexis1999 - 28.07.2012
Basically you want it to work everywhere as I understood, right?
pawn Код:
CMD:sendstrike(playerid, params[])
{
if(sscanf(params, "fffd", posstrike[0], posstrike[1], posstrike[2])) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sendstrike [X Coordinate] [Y Coordinate] [Z Coordinate]");
//if(IsPlayerInRangeOfPoint(playerid, 40, -370.26,2979.20,48.85))
//{
SendClientMessageEx(playerid, COLOR_GRAD2, " A Mortar Strike is En-Route to the Target Coordinates from Demorgan( 12 Seconds ) ");
SetTimer("StrikeTime", 12000, 0);
SetTimer("StrikeTimeWarning", 9000, 0);
//}
/*else if(IsPlayerInRangeOfPoint(playerid, 100, 422.130493,-2235.775146,20.270313))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " A Mortar Strike is En-Route to the Target Coordinates from the Carrier ( 10 Seconds ) ");
SetTimer("StrikeTime", 10000, 0);
SetTimer("StrikeTimeWarning", 7000, 0);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You are not in-range of the Altillery Control ");
}*/
return 1;
}