29.07.2012, 07:45
I'm sorry Kitty, you were right. Quite obvious if I look at it now
I didnt got sleep for over 30 hours so I wasn't fully awake.
One more thing
Should be
Otherwise it gives you an error
I didnt got sleep for over 30 hours so I wasn't fully awake.
One more thing
pawn Code:
stock GetNearestBus(PlayerID, &Name[], Len)
{
new Float: d = 9999.000,Float: dis = 9999.0000, number = -1;
for(new i = 0; i < sizeof(BusStops); i++)
{
dis = GetPlayerDistanceFromPoint(PlayerID, BusStops[i][BusCords][0], BusStops[i][BusCords][1], BusStops[i][BusCords][2]);
if(dis < d)
{
d = dis;
number = i;
}
}
format(Name, Len, BusStops[number][BusName], 0);
return Name;
}
pawn Code:
stock GetNearestBus(PlayerID, Name[], Len)
{
new Float: d = 9999.000,Float: dis = 9999.0000, number = -1;
for(new i = 0; i < sizeof(BusStops); i++)
{
dis = GetPlayerDistanceFromPoint(PlayerID, BusStops[i][BusCords][0], BusStops[i][BusCords][1], BusStops[i][BusCords][2]);
if(dis < d)
{
d = dis;
number = i;
}
}
format(Name, Len, BusStops[number][BusName], 0);
return Name;
}
