Jump to content

[REZOLVAT] Erroare compilare


TioO
 Share

Recommended Posts

Link to comment
Share on other sites

Probabil ai in gm functia 'GetClosestVehicle2(parametru1)', tu ai folosit 2 parametrii.

Lasa o poza si cu functia daca nu te descurci mai departe.

Edited by iMatt

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Acum 3 minute, iMatt a spus:

Probabil ai in gm functia 'GetClosestVehicle2(parametru1)', tu ai folosit 2 parametrii.

Lasa o poza si cu functia daca nu te descurci mai departe.

 

stock GetClosestVehicle2(playerid) {
	new Float: Distance;
	if(!Distance) Distance = 10.0;
	new Float:X[2], Float:Y[2], Float:Z[2], Float:NearestPos = floatabs(Distance), NearestVehicle = INVALID_VEHICLE_ID;
	GetPlayerPos(playerid, X[0], Y[0], Z[0]);
	for(new i; i < MAX_VEHICLES; i++) {
		if(!IsVehicleStreamedIn(i, playerid) || IsPlayerInVehicle(playerid, i)) continue;
		GetVehiclePos(i, X[1], Y[1], Z[1]);
		if(NearestPos > GetDistanceBetweenPoints(X[0], Y[0], Z[0], X[1], Y[1], Z[1])) NearestPos = GetDistanceBetweenPoints(X[0], Y[0], Z[0], X[1], Y[1], Z[1]), NearestVehicle = i;
	}
	return NearestVehicle;
}
Link to comment
Share on other sites

Acum 2 minute, TioO a spus:

 


stock GetClosestVehicle2(playerid) {
	new Float: Distance;
	if(!Distance) Distance = 10.0;
	new Float:X[2], Float:Y[2], Float:Z[2], Float:NearestPos = floatabs(Distance), NearestVehicle = INVALID_VEHICLE_ID;
	GetPlayerPos(playerid, X[0], Y[0], Z[0]);
	for(new i; i < MAX_VEHICLES; i++) {
		if(!IsVehicleStreamedIn(i, playerid) || IsPlayerInVehicle(playerid, i)) continue;
		GetVehiclePos(i, X[1], Y[1], Z[1]);
		if(NearestPos > GetDistanceBetweenPoints(X[0], Y[0], Z[0], X[1], Y[1], Z[1])) NearestPos = GetDistanceBetweenPoints(X[0], Y[0], Z[0], X[1], Y[1], Z[1]), NearestVehicle = i;
	}
	return NearestVehicle;
}

Inlocuieste:

GetClosestVehicle2(playerid, 100000);

Cu:

GetClosestVehicle2(playerid);

 

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...