Problem with Get3DZone
#1

why does Get3DZone only work for so long if i use /trackcar it works once then doesn't :/ and when i do /kcp(killcheckpoints) and retry still doesnt work ....
PHP Code:
    new zone[MAX_ZONE_NAME];
                
Get3DZone(carPos[0], carPos[1], carPos[2], zonesizeof(zone));
                
format(stringsizeof(string), "Your vehicle is located in %s."zone);
                
SendClientMessage(playeridCOLOR_YELLOWstring);
                
SetPlayerCheckpoint(playeridcarPos[0], carPos[1], carPos[2], 15.0);
                
SendClientMessage(playeridCOLOR_WHITE"Hint: Make your way to the checkpoint to find your vehicle!"); 
Reply
#2

"Get3DZone" is a custom function that is part of your game-mode, the only why we can help you, if you show us the code from it
Reply
#3

PHP Code:
stock Get3DZone(Float:xFloat:yFloat:zzone[], len//Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
{
        for(new 
0!= sizeof(gSAZones); i++ )
        {
                if(
>= gSAZones[i][SAZONE_AREA][0] && <= gSAZones[i][SAZONE_AREA][3] && >= gSAZones[i][SAZONE_AREA][1] && <= gSAZones[i][SAZONE_AREA][4] && >= gSAZones[i][SAZONE_AREA][2] && <= gSAZones[i][SAZONE_AREA][5])
                {
                    return 
format(zonelengSAZones[i][SAZONE_NAME], 0);
                }
        }
        return 
0;

Reply
#4

you will need to show in what condition you initialize the following variables
Code:
carPos[0], carPos[1], carPos[2]
still you are showing us partial code... and from my point off view is correct
i don't see any problem in it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)