SA-MP Forums Archive
[HELP + REP]Team for members - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP + REP]Team for members (/showthread.php?tid=557167)



[HELP + REP]Team for members - Mijata - 12.01.2015

i created new teams at script but i want that teams only for members

Code:
#define SK 3
#define SG 4
Code:
AddPlayerClass(285,1838.0135,-3079.4434,6.0971,359.9966, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(287,1838.0135,-3079.4434,6.0971,359.9966, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(282,1838.0135,-3079.4434,6.0971,359.9966, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(23,-171.6855,2704.5598,62.5543,90.8684,0,0,0,0,0,0); // T1
	AddPlayerClass(124,-171.6855,2704.5598,62.5543,90.8684,0,0,0,0,0,0); // T1
	AddPlayerClass(29,-171.6855,2704.5598,62.5543,90.8684,0,0,0,0,0,0); // T1
	AddPlayerClass(164,1838.0135,-3079.4434,6.0971,359.9966, 0, 0, 0, 0, 0, 0);//special gurads
	AddPlayerClass(247,-171.6855,2704.5598,62.5543,90.8684,0,0,0,0,0,0); // special killers
Code:
public OnPlayerRequestClass(playerid, classid)
{

            switch(classid)
            {
            case 0,1,2:
            {
                // TEAM STUFF
                GameTextForPlayer(playerid,"~b~Cops",1000,4);
                SetPlayerColor(playerid, C_COLOR);
                gTeam[playerid] = C1;
                SetPlayerPos(playerid,254.5903,1895.2537,20.3694);
                SetPlayerCameraPos(playerid,244.5754,1895.7119,19.8237);
                SetPlayerCameraLookAt(playerid,254.5903,1895.2537,20.3694);
                SetPlayerFacingAngle(playerid,90.6916);
                ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
                    }
                    case 3,4,5:
                    {
                GameTextForPlayer(playerid,"~r~Terrorists",1000,4);
                SetPlayerColor(playerid, T_COLOR);
                gTeam[playerid] = T1;
                SetPlayerPos(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerCameraPos(playerid,-279.0844,2660.7461,62.6090);
                SetPlayerCameraLookAt(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerFacingAngle(playerid,271.5169);
                ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
					}
                        case 6:
                    {
                GameTextForPlayer(playerid,"~b~Special Gurads",1000,4);
                SetPlayerColor(playerid, C_COLOR);
                gTeam[playerid] = C1;
                SetPlayerPos(playerid,254.5903,1895.2537,20.3694);
                SetPlayerCameraPos(playerid,244.5754,1895.7119,19.8237);
                SetPlayerCameraLookAt(playerid,254.5903,1895.2537,20.3694);
                SetPlayerFacingAngle(playerid,90.6916);
                ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
                
                	}
                        case 7:
                    {
                GameTextForPlayer(playerid,"~r~Special Killers",1000,4);
                SetPlayerColor(playerid, T_COLOR);
                gTeam[playerid] = T1;
                SetPlayerPos(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerCameraPos(playerid,-279.0844,2660.7461,62.6090);
                SetPlayerCameraLookAt(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerFacingAngle(playerid,271.5169);
                ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing
            }
    }
how to add team special killers and special gurads only for members like :

Code:
if(PlayerInfo[playerid][pMember] == 0) return SendClientMessage(playerid, -1, "You're not a member apply at forum to be.");



Re: [HELP + REP]Team for members - Mijata - 13.01.2015

bump like it ?




Re: [HELP + REP]Team for members - Mijata - 13.01.2015

bump


Re: [HELP + REP]Team for members - Mijata - 13.01.2015

bump!!


Re: [HELP + REP]Team for members - CalvinC - 13.01.2015

Just ****** around for a tutorial or such. I found alot.
https://sampforum.blast.hk/showthread.php?tid=107762
Here's one.
Anyways, don't bump after 1 hour of bumping, please read the forum rules.


Re: [HELP + REP]Team for members - Mijata - 13.01.2015

this is not it


Re: [HELP + REP]Team for members - CalvinC - 13.01.2015

That's why i said search on ******. There's alot of tutorials there.
I found something for you though, you might be able to do something like this:
pawn Code:
if(classid == 1 && gTeam[playerid] != C1)
{
    return 0;
}
I guess this is how it'll work, im not sure how you define your teams.
Im not saying that will work, but you might be able to do something like that.


Re: [HELP + REP]Team for members - Mijata - 13.01.2015

what i need to type in ****** to search more


Re: [HELP + REP]Team for members - CalvinC - 13.01.2015

"samp restrict classes to teams" that can get you some answers.