Laser just for S.W.A.T
#1

Hi, all can somebody give me a tutorial to make laser just for SWAT organisation... I know that there are filtescripts for laser, but how to make a laser just for SWAT can use it? Please help me
Reply
#2

You should make teams for this. Then add it only for that team.
Reply
#3

FS for laser : Laser Filterscript

To add it for team swat only

pawn Код:
//First define TEAMS
#define TEAM_SWAT 0
#define TEAM_OTHER 1

new gTeam[MAX_PLAYERS];

//Now you may assign team by
public OnPlayerRequestClass(playerid, classid)
{
    if(classid==0) gTeam[playerid] = TEAM_SWAT;
    //and so on
    return 1;
}
/*

++++++++NOW UNDER ON PLAYER UPDATE++++++++++
*/

public OnPlayerUpdate(playerid)
{
    if(gTeam[playerid]!=TEAM_SWAT) return 1;
    //And all the laser code here
    return 1;
}
If you will laser FS as a FS ,then ,in your GM add
pawn Код:
forward GetTeam(playerid);
public GetTeam(playerid)
{
    return gTeam[playerid];
}

//and in Laser filterscript add
public OnPlayerUpdate(playerid)
{
    new team = CallRemoteFunction("GetTeam","i",playerid);
    if(team!=0) return 1; //We defined TEAM_SWAT as 0 .
    //And all the laser code here
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)