GetPlayerLocationName
#1

I'm trying to get player's locatio name as singleplayer so I did this
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..... 
And the stock
PHP код:
stock GetPlayerLocationName(playerid)
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    for(new 
0sizeof(SanAndreasZones);i++)
    {
        if(
>= SanAndreasZones[i][ZoneArea] && <= SanAndreasZones[i][ZoneArea] && >= SanAndreasZones[i][ZoneArea] && <= SanAndreasZones[i][ZoneArea])
        {
            return 
SanAndreasZones[i][ZoneName];
        }
    }
    return -
1;

And when I tried it I got a strange character Something like ذ
Reply
#2

@nezo2001, use this instead.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)