[help]Drag Racing
#6

My first script is almost done! but I get 3 errors when I try to compile can some1 help plz
The Errors:
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\test1.pwn(17 9) : error 055: start of function body without function header
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\test1.pwn(18 0) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\test1.pwn(18 1) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\test1.pwn(56 5) : warning 203: symbol is never used: "dcmd_drag0"

The Code:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
//DRAG RACE---------------------------------------------------------------------
//******************************************************************************
{
  dcmd(drag,4, cmdtext);
  return 0;
}

dcmd_drag (playerid, params[]) //line 137
{
	new targetid, bet;
	if (sscanf(params, "ui", targetid,bet)) SendClientMessage(playerid, COLOR_RED, "Usage: /drag <playerid> <bet>");
	else if (targetid == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Player not found");
  else if (bet > GetPlayerMoney(playerid)) SendClientMessage(playerid, COLOR_RED, "Insufficient Funds");
	else
	{
		new str[128];
		new name[32];
		GetPlayerName(playerid,name,32);
		format(str,sizeof(str),"%s has challenged you to a 1/4 mile race betting %i$! Do you accept?(/drag0)",name,bet);
		SendClientMessage(targetid,COLOR_YELLOW,str);
		SetChallengerValue(playerid);
		SetChallengerVehValue(playerid);
		SetStakesValue(playerid);
	}
		
	return 1;
}
//DRAG ACCEPT-------------------------------------------------------------------
{//line 179
  dcmd(drag0,5,cmdtext);//line 180
  return 0;//line 181
}

dcmd_drag0 (playerid, params[])
	{
	  #pragma unused params
		new currentveh;
		new float:x, float:y, float:z, float:X, float:Y, float:a, float:b, float:c, float:d;
		currentveh = GetPlayerVehicleID(playerid);
		GetXYInFrontOfVehicle(challenger,X,Y,400);
    GetXYLeftOfVehicle(challenger[playerid],a,b,3);
    GetXYLeftOfVehicle(challenger[playerid],c,d,3);
		GetVehiclePos(challengerveh,x,y,z);
		SetPlayerRaceCheckpoint(challenger[playerid],1,X,Y,z,X,Y,z,10);
		SetPlayerRaceCheckpoint(playerid,1,X,Y,z,X,Y,z,10);
		SetVehiclePos(challengerveh[playerid],a,b,z);
		SetVehiclePos(currentveh,c,d,z);
 	}
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)