15.07.2012, 01:12
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
//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;
}
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;
}