What's wrong in this ?
#1

It Complie and don't give Errors / Warnings but when i do /gate IG nothing happen and it don't open , check the Codes :


Quote:

//POLICE BAR
if(!IsACop(playerid) && PlayerInfo[playerid][pMember] != 1) return SendClientMessage(playerid,COLOR_GREY," You are not a Cop / FBI / SAS / SWAT !");
if(pdgatebar==0)
{
pdgatebar = 1;
SetObjectRot( pdbarriergateobj, 0.0000, 360.0000, 90.0000);
SetObjectPos( pdbarriergateobj, 1544.682495, -1630.953003, 13.079567 );
}
else if(pdgatebar==1)
{
pdgatebar = 0;
SetObjectRot( pdbarriergateobj, 0.0000, 90.0000, 90.0000);
SetObjectPos( pdbarriergateobj, 1544.682495, -1630.980000, 13.215000 );
}
}
if(IsPlayerInRangeOfPoint(playerid,9,1642.9678,-1714.9400,15.602)
{ //FBI GATE
if(!(PlayerInfo[playerid][pMember] == 2)) return SendClientMessage(playerid,COLOR_GREY," You are not a member of FBI !");
if(fbigateopen == 0)
{
fbigateopen = 1;
MoveObject(FBIGate, 1643.4106, -1714.7389, 15.6083, 1.500000);
SendClientMessage(playerid, COLOR_RED, "FBI Gate is closing...");
}
else
{
fbigateopen = 0;
MoveObject(FBIGate, 1643.4106, -1714.7389, 9.6083, 1.500000);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "FBI Gate is opening...");
}
}

Reply
#2

PHP код:
if(PlayerInfo[playerid][pMember] == 1)
{
    if(
pdgatebar == 0)
    {
        
pdgatebar 1;
        
SetObjectRotpdbarriergateobj0.0000360.000090.0000);
        
SetObjectPospdbarriergateobj1544.682495, -1630.95300313.079567 );
        return 
1;
    }
    if(
pdgatebar == 1)
    {
         
pdgatebar 0;
         
SetObjectRotpdbarriergateobj0.000090.000090.0000);
         
SetObjectPospdbarriergateobj1544.682495, -1630.98000013.215000 );
        return 
1;
    }
}
else 
SendClientMessage(playerid,COLOR_GREY," You are not a Cop / FBI / SAS / SWAT !");
if(
IsPlayerInRangeOfPoint(playerid,9,1642.9678,-1714.9400,15.602))
//FBI GATE
    
if((PlayerInfo[playerid][pMember] == 2))
    {
        if(
fbigateopen == 0)
        {
            
fbigateopen 1;
            
MoveObject(FBIGate1643.4106, -1714.738915.60831.500000);
            
SendClientMessage(playeridCOLOR_RED"FBI Gate is closing...");
        }
        if(
fbigateopen == 1)
        {
            
fbigateopen 0;
            
MoveObject(FBIGate1643.4106, -1714.73899.60831.500000);
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"FBI Gate is opening...");
        }
    }    
    else 
SendClientMessage(playerid,COLOR_GREY," You are not a member of FBI !");
    return 
1;

I ahve tried to fix it. Maybe I have added soem returns more. Check if it works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)