[help]Drag Racing
#1

I want to allow players to challenge each other to a quatermile race on wich they can bet money (or even pink slips!).
I try to set a command "/drag" to create a check point 400m in front of the player's car.

Here is the script I know there's is alot missing but this is the core of the command when i try it it set the checpoint at 0,0,0. Also I need to figure out how adjust the Z coordinate of the checkpoint so it won't be underground or in the sky and if anyone as a betting system (ex: /dice [playerid][amount]) that would be great because it's script should the info I need to complete this.

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/drag", cmdtext, true, 10) == 0)
{
new float:A;
new float:deltaX;
new float:deltaY;
new float:deltaZ;
new float, float:y, float:z;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, A);
deltaX=(floatsin(A)*400);
deltaY=(floatcos(A)*400);
SetPlayerRaceCheckpoint(playerid, 2, x+deltaX, y+deltaY, z, x+deltaX, y+deltaY, z,5);
return 1;
}
return 0;
}

Reply


Messages In This Thread
[help]Drag Racing - by JadedJ - 15.07.2009, 18:41
Re: Plz Help with my Drag racing script...plz - by JadedJ - 17.07.2009, 15:10
Re: Plz Help with my Drag racing script...plz - by yezizhu - 17.07.2009, 15:27
Re: Plz Help with my Drag racing script...plz - by JadedJ - 17.07.2009, 21:18
Re: Spawn something in front of player - by yezizhu - 18.07.2009, 00:04
Re: [help]Drag Racing - by JadedJ - 20.07.2009, 16:53
Re: [help]Drag Racing - by yezizhu - 20.07.2009, 17:43
Re: [help]Drag Racing - by JadedJ - 20.07.2009, 23:01
Re: [help]Drag Racing - by yezizhu - 23.07.2009, 17:02
Re: [help]Drag Racing - by JadedJ - 28.07.2009, 23:58

Forum Jump:


Users browsing this thread: 1 Guest(s)