#1

Is there a way to check if player is at 24-7?

Like IsPlayerAt247 or something...
Reply
#2

Yes, you'll need to get the co-ords of the insides of all 24/7s, and use PlayerToPoint, or IsPlayerInSquare, or similiar.
Reply
#3

Is there an website or something to found it?
Reply
#4

PlayerToPoint function

pawn Код:
PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        tempposx = (oldposx -x);
        tempposy = (oldposy -y);
        tempposz = (oldposz -z);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Reply
#5

I do believe the Godfather script has a function similar to that for its "/buy" command. Maybe you could "borrow" some coordinates from that
Reply
#6

Okay but there ar elots of 24/7 spread out the whole san andreas and at god father script only have one coord . :/

Код:
if (!PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))//centerpoint 24-7
Reply
#7

I do believe that all the 24-7's are located near each other in the "interior world" of GTA:SA. But don't take my word for it. Best bet is to test it in game, with something as simple as:

pawn Код:
if (strcmp("/test", cmdtext, true) == 0)
{
    if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))
    {
        SendClientMessage(playerid, COLOR, "You are in a 24-7!");
    }
    else
    {
        SendClientMessage(playerd, COLOR, "You are not in a 24-7!");
    }
    return 1;
}
Reply
#8

Okay but, i was looking at san fierro and, I could not found a 24/7 there. does them exists there?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)