15.07.2009, 18:41
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.
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; } |