SA-MP Forums Archive
how do i check current vehicles angle between A & B ? - 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: how do i check current vehicles angle between A & B ? (/showthread.php?tid=299708)



how do i check current vehicles angle between A & B ? - English-Conceptz - 27.11.2011

ok so i want when a vehicle the player is driving enters a checkpoint to make sure its between say 250 & 270 degrees for an example. how would i do that ? so far i have this:

PHP код:
    if(strcmp(cmdtext"/goto"true) ==0
     
{
         
SetPlayerCheckpoint(playerid,1421.7950,-914.9064,36.0469);
         
         if (
IsPlayerInCheckpoint(playerid))
         {
                     
// if player's vehicle is between 250-270 degrees
                         
{
                           
SendClientMessage(playeridCOLOR_RED"sentence 1");
                           
SendClientMessage(playeridCOLOR_RED"sentence 2")
                          
                          else
                          
SendClientMessage(playeridCOLOR_RED"you need to reverse up to the X")
                         }
         }
      } 
just started my first from scratch script so dont slate me or troll it isnt helpful =[