Can't seem to make commands only for a team with gteam
#3

I don't understand what do you want, do you want a command only for police gTeam?

pawn Код:
#include   < a_samp >
#define    TEAM_POLICE    ( 8 )

new
    gTeam[ MAX_PLAYERS ]
;

public OnPlayerRequestClass( playerid, classid )
{
    if ( classid == 8 ) gTeam[ playerid ] = TEAM_POLICE, SendClientMessage( playerid, -1, "police" );

    return 1;
}
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if ( !strcmp( cmdtext, "/help", true ) )
    {
        if ( gTeam[ playerid ] != TEAM_POLICE )
            return SendClientMessage( playerid, -1, "You are not a police." );

        // Your stuffs came here

        return 1;
    }
 
    return 0;
}
Quote:

it gives me mils of errors like playermoveobject is not implemented

You don't have PlayerMoveObject function, about that error.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)