I'm having an issue with this function. I have the below code:
The issue is that when it prints it onto the screen, every word is on a new line. I know that a string is meant to be something like "This_is_one_line" but since the 3D Zone string that's produced has spaces instead of underscores, it's difficult to get it to work correct.
Any tips?
Code:
new zone[28];
GetPlayer3DZone(i, zone, MAX_ZONE_NAME);
PlayerTextDrawSetString(i, p_LocationTextdraw[i][1], zone);
The issue is that when it prints it onto the screen, every word is on a new line. I know that a string is meant to be something like "This_is_one_line" but since the 3D Zone string that's produced has spaces instead of underscores, it's difficult to get it to work correct.
Any tips?
Code:
stock GetPlayer3DZone(playerid, zone[], len) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
{
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] && z >= gSAZones[i][SAZONE_AREA][2] && z <= gSAZones[i][SAZONE_AREA][5])
{
? ? return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}