Command enter problems
#1

Hello I make Dymanic Doors System but my enter command doesn't stuck can you help me please I try everything but it doesn't work

Here is my Pawn Code:
pawn Код:
CMD:enter(playerid, params[])
{

    // DEBUGG TESTING!!

    printf("DDoorsInfo Has %d var's", sizeof(DDoorsInfo));


    // You has started at "0"!
    for(new b = 0; b < sizeof(DDoorsInfo); b++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, DDoorsInfo[b][ddEnterX], DDoorsInfo[b][ddEnterY], DDoorsInfo[b][ddEnterZ]))//Checks if player is near the Enter.
        {
            if(DDoorsInfo[b][dLocked] == 1) return SendClientMessage(playerid, COLOR_GREY, "This Door is locked!");//Checks it it is locked/
            SetPlayerPos(playerid, DDoorsInfo[b][ddExitX], DDoorsInfo[b][ddExitY], DDoorsInfo[b][ddExitZ]);
            SetPlayerFacingAngle(playerid, DDoorsInfo[b][ddExitA]);
            SetPlayerInterior(playerid, DDoorsInfo[b][ddInteriorInt]);
            SetPlayerVirtualWorld(playerid, DDoorsInfo[b][ddInteriorVW]);
            InsideDoors[playerid] = b;
            break;
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, DDoorsInfo[b][ddExitX], DDoorsInfo[b][ddExitY], DDoorsInfo[b][ddExitZ]) && GetPlayerVirtualWorld(playerid) == DDoorsInfo[b][ddInteriorVW])//Checks if player is in near the exit.
        {
            SetPlayerPos(playerid, DDoorsInfo[b][ddEnterX], DDoorsInfo[b][ddEnterY], DDoorsInfo[b][ddEnterZ]);
            SetPlayerFacingAngle(playerid, DDoorsInfo[b][ddEnterA]);
            SetPlayerInterior(playerid, DDoorsInfo[b][ddExteriorInt]);
            SetPlayerVirtualWorld(playerid, DDoorsInfo[b][ddExteriorVW]);
            InsideDoors[playerid] = 0;
            break;
           
        }
    }

    if (IsPlayerInRangeOfPoint(playerid,3.0,2249.8784,52.7020,26.6671))
    {
        SetPlayerPos(playerid,207.5627,-103.7291,1005.2578);
        SetPlayerVirtualWorld(playerid, 15);
        SetPlayerFacingAngle(playerid, 270);
    }
    return 1;
}
EDIT: DDoorsInfo Has 800 var's
Reply


Messages In This Thread
Command enter problems - by RenSoprano - 16.07.2012, 13:45
Re: Command enter problems - by ZBits - 16.07.2012, 14:41
Re: Command enter problems - by RenSoprano - 16.07.2012, 15:20

Forum Jump:


Users browsing this thread: 2 Guest(s)