[PROBLEM]/enter command
#1

I have a House System and isn't working /enter command, when y type /enter like the cmd isn't existence.
pawn Код:
f(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new i = 0; i < sizeof(HouseInfo); i++)
            {
                if (IsPlayerInRangeOfPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
                {
                    //printf("Found House :%d",i);
                    if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
                    {
                            SafeSetPlayerInterior(playerid,HouseInfo[i][hInt]);
                            SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
                            SafeSetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
                            GameTextForPlayer(playerid, "~w~Dobrodosao kuci", 5000, 1);
                            PlayerInfo[playerid][pLocal] = i;
                            PlayerInfo[playerid][pVirWorld] = HouseInfo[i][hWorld];
                            PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
                            HouseEntered[playerid] = i;
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
                        return 1;
                    }
                }
            }
Reply
#2

pawn Код:
if (IsPlayerInRangeOfPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))// why do you have a 3 there?
Reply
#3

xyz ?
Reply
#4

Check the function:
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#5

USE:

PHP код:
if (IsPlayerInRangeOfPoint(playerid3.0,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)