Exploding cars problem
#1

Having problems with these error codes with the car explode system, I am trying to make it so the cars do not blowup but there can be totalled! Won't work please help
The errors are here codes

Код:
 error 055: start of function body without function header
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 021: symbol already defined: "GetVehicleHealth"
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration
: error 010: invalid function or declaration





Here is the full script bit am trying to make it so it does not blow up the cars if u can fix this ill rate and love you guys for it big thank you and i +Rep you and get my friends to




// Timer Name: ServerMicrobeat()
// TickRate: 250 Milliseconds
//Timer:ServerMicrobeat[250]()
{
new
Float: fExpHealth,
Float: fCurrentSpeed,
iVehicle,
szSpeed[42],
arrVehParams[7],
arrDamage[4];

foreach(Player, i)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
if(arr_Towing[i] != INVALID_VEHICLE_ID) {
if(GetVehicleModel(arr_Towing[i]) && IsVehicleStreamedIn(arr_Towing[i], i)) AttachTrailerToVehicle(arr_Towing[i], GetPlayerVehicleID(i));
else arr_Towing[i] = INVALID_VEHICLE_ID;
}
fCurrentSpeed = player_get_speed(i);
if(PlayerInfo[i][pAdmin] <= 1) switch(Seatbelt[i]) {
case 0: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - (fVehSpeed[i] - fCurrentSpeed) / 2.0);
default: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - ((fVehSpeed[i] - fCurrentSpeed) / 4.0));
}
fVehSpeed[i] = fCurrentSpeed;
iVehicle = GetPlayerVehicleID(i);

GetVehicleHealth(iVehicle,fExpHealth);
if(fExpHealth < 350.0)
{
SetVehicleHealth(iVehicle, 251.0);
GetVehicleParamsEx(iVehicle, arrVehParams[0], arrVehParams[1], arrVehParams[2], arrVehParams[3], arrVehParams[4], arrVehParams[5], arrVehParams[6]);
if(arrVehParams[0] == VEHICLE_PARAMS_ON) SetVehicleParamsEx(iVehicle,VEHICLE_PARAMS_OFF, arrVehParams[1], arrVehParams[2], arrVehParams[3], arrVehParams[4], arrVehParams[5], arrVehParams[6]);
GameTextForPlayer(i, "~r~Totalled!", 2500, 3);
arr_Engine{iVehicle} = 0;
}
else if(PlayerInfo[i][pSpeedo] != 0 && FindTimePoints[i] == 0 && arr_Engine{iVehicle} == 1) {
format(szSpeed, sizeof(szSpeed),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~%.0f MPH", fCurrentSpeed);
GameTextForPlayer(i, szSpeed, 1500, 3);
}
for(new s=0;s<10;s++)
{
if(SpikeStrips[s][sX] != 0) // Reduced from three vars to one
{
if(VehicleToPoint( 3.0, iVehicle, SpikeStrips[s][sX], SpikeStrips[s][sY], SpikeStrips[s][sZ]))
{
GetVehicleDamageStatus(iVehicle, arrDamage[0], arrDamage[1], arrDamage[2], arrDamage[3]);
arrDamage[3] = encode_tires(1, 1, 1, 1);
UpdateVehicleDamageStatus(iVehicle, arrDamage[0], arrDamage[1], arrDamage[2], arrDamage[3]);
}
}
}
}

else if(GetPlayerState(i) == PLAYER_STATE_PASSENGER) {
fCurrentSpeed = player_get_speed(i);
if(PlayerInfo[i][pAdmin] <= 1) switch(Seatbelt[i]) {
case 0: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - (fVehSpeed[i] - fCurrentSpeed) / 2.0);
default: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - ((fVehSpeed[i] - fCurrentSpeed) / 4.0));
}
fVehSpeed[i] = fCurrentSpeed;
}
}
}


// Timer Name: VehicleUpdate()
// TickRate: 10 secs.
Timer:VehicleUpdate[10000]()
{
	new engine,lights,alarm,doors,bonnet,boot,objective,modelid;
	for(new v = 0; v < MAX_VEHICLES; v++) if(GetVehicleModel(v)) {

		modelid = GetVehicleModel(v);
		GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
		switch(modelid) {
			case 520, 476, 593, 553, 513, 512, 577, 592, 511, 539, 464, 519: VehicleFuel[v] = 100;
			case 509, 481, 510: VehicleFuel[v] = 100, arr_Engine{v} = 1, SetVehicleParamsEx(v,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
		}
		if(engine == VEHICLE_PARAMS_ON) {
			if(VehicleFuel[v] > 0.0 && !IsVIPcar(v) && !IsATruckerCar(v))
			{
				VehicleFuel[v]-=0.01;
				if(VehicleFuel[v] <= 0.0) SetVehicleParamsEx(v,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
			}
			if(arr_Engine{v} == 0) SetVehicleParamsEx(v,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
		}
	}
}
CMD:ch(playerid, params[])
{
	if (PlayerInfo[playerid][pHelper] >= 1)
	{
		SendClientMessageEx(playerid, COLOR_GREEN,"_______________________________________");
		SendClientMessageEx(playerid, COLOR_GRAD1, "*1* HELPER *** (/n)ewbie /hlkick /hlban");
	}
	if (PlayerInfo[playerid][pHelper] >= 2)
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "*2* COMMUNITY HELPER *** /togjoin (/c)advisor /nmute /admute /cduty /accepthelp /advisors /mjail /kick /helps");
	}
	if (PlayerInfo[playerid][pHelper] >= 3)
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "*3* SENIOR HELPER *** /requestevent");
	}
	if (PlayerInfo[playerid][pHelper] >= 4)
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "*4* CHIEF HELPER *** /nonewbie /makehelper /takeadvisor /cmotd /makeadvisor (/o)oc");
	}
	if (PlayerInfo[playerid][pHelper] >= 1)
	{
		SendClientMessageEx(playerid, COLOR_GREEN,"_______________________________________");
	}
	return 1;
}
CMD:shop(playerid, params[])
{
	if(!IsPlayerInRangeOfPoint(playerid,20.0,-103.9105,-22.3268,1000.7188))
	{
		SendClientMessageEx(playerid, COLOR_GRAD2, "   You are not at the Sex Shop!");
		return 1;
	}
	ShowPlayerDialog(playerid, SHOPMENU, DIALOG_STYLE_LIST, "Sex Shop", "Purple Dildo		$50\nShort Vibrator		$100\nLong Vibrator		$500\nWhite Dildo		$50", "Buy", "Cancel");
	return 1;
}
CMD:makeundercover(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 8) {
		SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
		return 1;
	}

	new string[128], giveplayerid;
	if(sscanf(params, "d", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /makeundercover [playerid]");

	if(IsPlayerConnected(giveplayerid)) {
		if(PlayerInfo[giveplayerid][pUndercover] != 1) {
			PlayerInfo[giveplayerid][pUndercover] = 1;
			format(string, sizeof(string), "You have made %s a Undercover.", GetPlayerNameEx(giveplayerid));
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
			format(string, sizeof(string), "You have been made a Undercover by %s.", GetPlayerNameEx(playerid));
			SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
		} else {
			PlayerInfo[giveplayerid][pUndercover] = 0;
			format(string, sizeof(string), "You have revoked %s's Undercover.", GetPlayerNameEx(giveplayerid));
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
			format(string, sizeof(string), "You have had your Undercover revoked by %s.", GetPlayerNameEx(playerid));
			SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
          }
   }
   return 1;
}
Much help appreciated
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)