public PlacaVeiculoPerto(playerid)
{
for( new i; i < MAX_VEHICLES; i++) {
new Float:Pos[3];
GetVehiclePos(i, Pos[0], Pos[1], Pos[2]);
if(IsPlayerInRangeOfPoint(playerid, 7.0, Pos[0], Pos[1], Pos[2])) {
return i;
}
}
return 0;
}
public PlacaVeiculoPerto(playerid)
{
new Float:distance = 10.0, Float: currentDistance = 11.0, vehicleid = 0, Pos[3];
for( new i; i < MAX_VEHICLES; i++) {
GetVehiclePos(i, Pos[0], Pos[1], Pos[2]);
currentDistance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
if(currentDistance <= 7.0 && currentDistance < distance) {
vehicleid = i;
distance = currentDistance;
}
}
return vehicleid;
}
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(3075) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(3075) : warning 213: tag mismatch C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(3075) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings.
stock PlacaVeiculoPerto(playerid)
{
new Float:distance = 10.0, Float: currentDistance = 11.0, vehicleid = 0, Pos[3];
for(new i; i < MAX_VEHICLES; i++)
{
GetVehiclePos(i, Pos[0], Pos[1], Pos[2]); //error <<<<<<<<<<<
currentDistance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
if(currentDistance <= 7.0 && currentDistance < distance) {
vehicleid = i;
distance = currentDistance;
}
}
return vehicleid;
}
stock PlacaVeiculoPerto(playerid)
{
new Float:distance = 10.0, Float: currentDistance = 11.0, vehicleid = 0, Float:Pos[3];
for(new i; i < MAX_VEHICLES; i++)
{
GetVehiclePos(i, Pos[0], Pos[1], Pos[2]);
currentDistance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
if(currentDistance <= 7.0 && currentDistance < distance) {
vehicleid = i;
distance = currentDistance;
}
}
return vehicleid;
}
Hello!
You forgot the Float:-Tag. PHP Code:
- Mencent ![]() |
public PlayerPertoVeiculo(playerid)
{
static Float:Pos[3];
for( new i; i < MAX_VEHICLES; i++) {
GetVehiclePos(i, Pos[0], Pos[1], Pos[2]);
if(IsPlayerInRangeOfPoint(playerid, 7.0, Pos[0], Pos[1], Pos[2])) {
return 1;
}
}
return 0;
}