08.03.2014, 00:58
Quote:
Aparentemente, й em alguma stock relacionada ao nome do veiculo (sei por prбtica).
Mande seu GetVehicleName ... |
estб vehName[GetVehicleModel(vehicle)-400]);
ai eu troquei pra ver
aqui tem outras
pawn Code:
stock GetPlayerSpeed(playerid,bool:kmh)
{
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid), Vx, Vy, Vz); else GetPlayerVelocity(playerid, Vx, Vy, Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
stock ReturnPlayerZone(playerid)
{
new location[MAX_ZONE_NAME];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
return location;
}
stock GetPlayer2DZone(playerid, zone[], len)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i != sizeof(gSAZones); i++)
{
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
{
return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
stock GetPlayerArea(playerid)
{
new str[130];
format(str,sizeof(str), "%s", Zones[GetPlayerZone(playerid)][zone_name]);
return str;
}
}