Error with Positions
#1

When I type /docarrest .... its saying You are not at DoC Facilties ...idk why ... I am not seeing any error's


pawn Код:
CMD:docarrest(playerid, params[])
{
    if(IsACop(playerid)) {
        if(!IsPlayerInRangeOfPoint(playerid, 12.0, 1788.3121, -1569.8536, 22.9151) || !IsPlayerInRangeOfPoint(playerid, 12.0, 1760.0992, -1541.9899, 9.3473))
        {
            SendClientMessageEx(playerid, COLOR_GREY, "You're not at DoC Facilities.");
            return 1;
        }
        new giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /docarrest [playerid]");

        if(IsPlayerConnected(giveplayerid))
        {
            if(giveplayerid == playerid) {
                return SendClientMessageEx(playerid, COLOR_GREY, "You can't arrest yourself.");
            }
            if(ProxDetectorS(8.0, playerid, giveplayerid))
            {
                new string[37 + MAX_PLAYER_NAME];
                SetPVarInt(giveplayerid, "IsFrozen", 0);
                format(string, sizeof(string), "* You've brought %s to DoC Facilities.", GetPlayerNameEx(giveplayerid));
                SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
                format(string, sizeof(string), "* %s brought you to DoC Facilities.", GetPlayerNameEx(playerid));
                SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
                GameTextForPlayer(giveplayerid, "~w~Welcome to ~n~~r~DoC Facilities", 5000, 3);
                TogglePlayerControllable(giveplayerid, 1);
                ClearAnimations(giveplayerid);
                PlayerCuffed[giveplayerid] = 0;
                SetPVarInt(giveplayerid, "PlayerCuffed", 0);
                format(PlayerInfo[giveplayerid][pPrisonedBy], 24, "%s", GetPlayerNameEx(playerid));
                format(PlayerInfo[giveplayerid][pPrisonReason], 128, "[IC] Military Apprehension");
                WantedPoints[giveplayerid] = 0;
                PlayerInfo[giveplayerid][pWantedLevel] = 0;
                SetPlayerToTeamColor(giveplayerid);
                SetPlayerWantedLevel(giveplayerid, 0);
                SetPlayerSkin(giveplayerid, 50);
                PlayerInfo[giveplayerid][pJailed] = 2;
                PhoneOnline[giveplayerid] = 1;
                PlayerInfo[giveplayerid][pJailTime] = 3600;
                SetPlayerInterior(giveplayerid, 1);
                PlayerInfo[giveplayerid][pInt] = 1;
                SetPlayerSkin(giveplayerid, 50);
                SetPlayerVirtualWorld(giveplayerid, 0);
                PlayerInfo[giveplayerid][pVW] = 0;
                SetPlayerColor(giveplayerid, TEAM_ORANGE_COLOR);
                GameTextForPlayer(giveplayerid, "Objects loading...", 1000, 5);
                SetPVarInt(giveplayerid, "LoadingObjects", 1);
                SetTimerEx("SafeLoadObjects", 4000, 0, "d", giveplayerid);
                new rand = random(sizeof(ICPrisonSpawns));
                Streamer_UpdateEx(giveplayerid, ICPrisonSpawns[rand][0], ICPrisonSpawns[rand][1], ICPrisonSpawns[rand][2]);
                SetPlayerPos(giveplayerid, ICPrisonSpawns[rand][0], ICPrisonSpawns[rand][1], ICPrisonSpawns[rand][2]);
                ResetPlayerWeaponsEx(giveplayerid);
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_GREY, "That player isn't near you.");
                return 1;
            }
        }
        else
        {
            SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Error with Positions - by Neo Karls - 14.12.2012, 13:08
Re: Error with Positions - by Threshold - 14.12.2012, 13:15
Re: Error with Positions - by Neo Karls - 14.12.2012, 13:26
Re: Error with Positions - by ReneG - 14.12.2012, 13:27
Re: Error with Positions - by mamorunl - 14.12.2012, 14:24
Re: Error with Positions - by maramizo - 14.12.2012, 15:18

Forum Jump:


Users browsing this thread: 1 Guest(s)