SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 01/08/2009, 09:38 AM   #1
v331
Little Clucker
 
Join Date: Jul 2009
Posts: 1
Reputation: 0
Default yrace

hi all, i have some problem with "yrace"; when a player type /join i would well like what him and her car are in the good position of the start of the race and the cars are lined up according to the number of participant.

I have some idea but it do not work


Code:
dcmd_join(playerid,params[])
{
  new Float:nx, Float:tx, Float:ny, Float:ty ;
  new Float:NormeAB;
  new Float:Angle;

  tx = RaceCheckpoints[0][0]; // X CP of start (target)
  ty = RaceCheckpoints[0][1]; // Y CP of start (target)
  nx = RaceCheckpoints[1][0]; // X first CP (next)
  ny = RaceCheckpoints[1][1]; // Y first CP (next)

			
  NormeAB = floatsqroot ((nx-tx)*(nx-tx) + (ny-ty)*(ny-ty));

			
  SetVehicleZAngle (Angle = asin ((ny-ty)/NormeAB));

			
  if (tx > nx)
  {
  Angle = 180.0 - Angle;
  }

			
  Angle = Angle - 90.0;
  TogglePlayerControllable(playerid, 0);
	if(RaceBuilders[playerid] != 0)
	{
	  SendClientMessage(playerid, COLOR_YELLOW, "You are currently building a race, can't join. Use /clearrace to exit build mode.");
	  return 1;
	} . . .
and :

Code:
#define DECALAGE_X 2
  #define DECALAGE_Y 2
  #define DECALAGE_Z 2
   new participants;
Code:
Participants++;
  SetPlayerPos(playerid,RaceCheckpoints[0][0]+participants*DECALAGE_X,RaceCheckpoints[0][1]+participants*DECALAGE_Y,RaceCheckpoints[0][2]+participants*DECALAGE_Z);
sorry for my bad english , i'm french :S
tk for your help
v331 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
50 yrace files! sansan Filterscripts 18 03/03/2011 04:37 AM
[FilterScript] [FS] yrace PT/BR P.E.T Phoenix_Br Lançamentos/Releases 0 15/04/2010 12:35 PM
yrace help Dragonheart Help Archive 0 01/09/2009 04:24 PM
ADmin FS and Yrace Igdirli 76 Help Archive 1 09/06/2009 02:48 PM
Modified Yrace YamahaYZ Help Archive 2 13/04/2009 09:11 PM


All times are GMT. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.