problem with gates need fast help
#1

...,
Reply
#2

bump
Reply
#3

You should never get "Unknown Command" because you always return 1 therefore I think the command gets never called
Just put a print at the top of your command, that should be the basic layout
pawn Код:
CMD:opengate(playerid, params[])
{
    SendClientMessage(playerid, -1, "/opengate");

    if(gTeam[playerid] == THE_TEAM_THAT_CAN_OPEN_THE_GAME)
    {
        if(IsPlayerInRangeOfPoint(playerid,15.0,-726.69012, 970.46442, 14.01690))
        {
            MoveObject(Gate,-726.69012, 970.46442, 8.64090,3);
            return true;
        }
        SendClientMessage(playerid, -1, "You are not near the gate");
    }
    return false; // "Unknown Command" for player who aren't in the correct team
}
Reply
#4

PHP код:
CMD:opengate(playeridparams[])
{
    if(
gTeam[playerid] == C1 || gTeam[playerid] ==  T1) return 0;
    if(
IsPlayerInRangeOfPoint(playerid,15.0,-726.69012970.4644214.01690))
    {
        
MoveObject(Gate,-726.69012970.464428.64090,3);
        
SendClientMessage(playerid,-1,"Gate is opened!");
    }
    else
    {
        
SendClientMessage(playerid,-1,"You are not in base");
    }
    return 
1;
}
    
    
CMD:closegate(playeridparams[])
{
    if(
gTeam[playerid] == C1 || gTeam[playerid] == T1) return 0;
    if(
IsPlayerInRangeOfPoint(playerid,15.0,-726.69012970.4644214.01690))
    {
        
MoveObject(Gate,-726.69012970.4644214.01690,3);
        
SendClientMessage(playerid,-1,"Gate is closed!");
     }
    else
    {
        
SendClientMessage(playerid,-1,"You are not in base");
    }
    return 
1;

Reply
#5

thanks fixed and help me here : https://sampforum.blast.hk/showthread.php?tid=580405
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)