pawn Код:
if(!strcmp(cmdtext, "/bam", true))
{
SetPVarInt(playerid,"launcher",1);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(i==playerid) continue;
GetPlayerPos(playerid,Xp, Yp,Zp);
GetPlayerPos(i,Xt, Yt,Zt);
if(IsPlayerInRangeOfPoint(i,TargetRange,Xp, Yp,Zp))
{
Vrocket[playerid] = CreateObject(ROCKETOBJECT, Xp, Yp,Zp+5,0.0,0.0,0.0,5.0); //
MoveObject(Vrocket[playerid], Xt, Yt, Zt, ROCKETSPEED);
return 1; //So that there are not multiple rockets
}
}
}