AdminPlace probs
#1

Hey I have built an adminplace in MTA, converted and put in my FS so here's whats wrong:
1. I have a barrier what should open when I'm range of it and press KEY_JUMP: (placed in OnPlayerUpdate, I have GetPlayerKeys above..)
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,100,-3017.671875,87.12003326416,3.1767473220825)) {
        if(Keys & KEY_JUMP) {
            if(PlayerInfo[playerid][pAdminLevel] >= 1) {
                new Float:r1,Float:r2,Float:r3;
                GetObjectRot(968,r1,r2,r3);
                if(r1 == 0 && r2 == 90 && r3 == 90) {
                    SetObjectRot(968,0,0,90);
                } else {
                    SetObjectRot(968,0,90,90);
                }
            }
        }
    }
This does nothing.

2. AdminPlace gates not opening / closing:
pawn Код:
COMMAND:open(playerid) {
    if(PlayerInfo[playerid][pAdminLevel] >= 1) {
        new
            Float:pos1,
            Float:pos2,
            Float:pos3,
            Float:p1,
            Float:p2,
            Float:p3,
            gate;
        gate = 980;
        GetObjectPos(gate,p1,p2,p3);
        pos1 = -2923.7041015625;
        pos2 = 87.95703125;
        pos3 = 8.1656465530396;
        if(pos1 != p1 && pos2 != p2 && pos3 != p3) {
            MoveObject(gate,pos1,pos2,pos3,1.5);
            SendClientMessage(playerid,yellow,"AdminPlace gates opening!");
        } else {
            return SendClientMessage(playerid,red,"AdminPlace gates are opened already!");
        }
    } else {
        return SendClientMessage(playerid,red,"Only admins can use this command.");
    }
    return 1;
}
(open and close commands are the same with other coordinates and texts..)

The only working thing is the AdminProtect.
If you are not an admin, and you are in the range of AdminPlace you will be exploded.

So whats the problem with these?

Thx.
Reply
#2

Anybody? :\
Reply
#3

Thanks for your help.
I solved it myself :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)