24.06.2015, 14:15
I'm trying to get player's locatio name as singleplayer so I did this
And the stock
And when I tried it I got a strange character Something like ذ
PHP код:
enum MainZone
{
ZoneName[26],
Float:ZoneArea[6]
};
static const SanAndreasZones[][MainZone] = {
{"The Big Ear", {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
{"Aldea Malvada", {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
{"Angel Pine", {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
{"Arco del Oeste", {-901.10,2221.80,0.00,-592.00,2571.90,200.00}},
{"Avispa Country Club", {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00}},
{"Avispa Country Club", {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00}},
{"Avispa Country Club", {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00}},
/////Etc.....
PHP код:
stock GetPlayerLocationName(playerid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i < sizeof(SanAndreasZones);i++)
{
if(x >= SanAndreasZones[i][ZoneArea] && x <= SanAndreasZones[i][ZoneArea] && y >= SanAndreasZones[i][ZoneArea] && y <= SanAndreasZones[i][ZoneArea])
{
return SanAndreasZones[i][ZoneName];
}
}
return -1;
}