Jump to content
  • 0

Team 2 la Cop


yLuSsSIoN

Question

Salut , deci am o problema .

Vreau ca atunci cand un player este bagat in pd,fbi,ng sau este leader la pd,fbi,ng , sa primeasca automat Team 2 ( Adica cop )

Comanda /invite si /makeleader :

if(strcmp(cmd, "/invite", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /invite [playerid/PartOfName]");
				return 1;
			}
			new para1;
			new ftext[20];
			para1 = ReturnUser(tmp);
			if (PlayerInfo[playerid][pLeader] >= 1)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
					    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
					    {
					        if(PlayerInfo[para1][pJob] > 0)
					        {
					            SendClientMessage(playerid, COLOR_GREY, "   Can't invite him, player has a Job !");
					            return 1;
					        }
					        if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
					        else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
					        else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
					        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Firemen/Ambulance"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
					        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "TheMafia"; ChosenSkin[para1] = 124; SetPlayerSkin(para1, 124); }
					        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "The Triads"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 120); }
					        else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
					        else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127); }
					        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
					        else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Cab Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
					        else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
					        //else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Bikers"; ChosenSkin[para1] = 100; SetPlayerSkin(para1, 100); }
                           //else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "San Fierro Riffa"; ChosenSkin[para1] = 173; SetPlayerSkin(para1, 173); }
                            //else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Da Nang Boyz"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
                            else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Los Santos Vagos"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
                            else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Los Aztecas"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }
                            else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "Ballas"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 102); }
                            else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "Grove"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
							else { return 1; }
							GetPlayerName(para1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
							PlayerInfo[para1][pRank] = 1;
							printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);
							format(string, sizeof(string), "   You have Joined the %s, you were invited by Leader %s", ftext, sendername);
							SendClientMessage(para1, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "   You have Invited %s to join the %s.", giveplayer,ftext);
							SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
							SetPlayerInterior(para1,0);
							new rand = random(sizeof(gInviteSpawns));
							SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
							SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
							SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
							SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
							TogglePlayerControllable(para1, 0);
						    SelectChar[para1] = 255;
						    SelectCharID[para1] = PlayerInfo[para1][pMember];
						    SelectCharPlace[para1] = 1;
						    PlayerInfo[para1][pModel] = ChosenSkin[para1];
					    	PlayerInfo[para1][pChar] = ChosenSkin[para1];
						    SendClientMessage(para1, COLOR_LIGHTRED, "* Use 'next' to Select the char you want to use.");
						    SendClientMessage(para1, COLOR_LIGHTRED, "* If you've found the Char you want to use, type 'done'.");
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "  That player is currently Wanted / a Different Team / or already a Family Member.");
						    return 1;
						}
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Nu esti autorizat sa folosesti aceasta comanda(leaders only)!");
			}
		}
		return 1;
	}
if(strcmp(cmd, "/makeleader", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /makeleader [playerid/PartOfName] [Number(1-10)]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(level > 18 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Dont go below number 0, or above number 11!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 1337)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
			            if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
			            {
			                SendClientMessage(playerid, COLOR_GREY, "   That player is in a Faction / Family !");
			                return 1;
			            }
						else
						{
							GetPlayerName(para1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							PlayerInfo[para1][pLeader] = level;
							format(string, sizeof(string), "   You have been promoted to Leader to your requested Faction by Admin %s", sendername);
							SendClientMessage(para1, COLOR_LIGHTBLUE, string);
							format(string, sizeof(string), "   You have given %s control to run Faction Number %d.", giveplayer,level);
							SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
							if(level == 0) { PlayerInfo[para1][pChar] = 0; }
							else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //Police Force
							else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI/ATF
							else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
							else if(level == 4) { PlayerInfo[para1][pChar] = 228; } //Fire/Ambulance
							else if(level == 5) { PlayerInfo[para1][pChar] = 113;	gTeam[para1] =  5;	} //Tha Mafie
							else if(level == 6) { PlayerInfo[para1][pChar] = 120;	gTeam[para1] = 6;} //The Triads
							//else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
							else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitmans
							else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //News Reporters
							else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
							else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Driving/Flying School
							//else if(level == 12) { PlayerInfo[para1][pChar] = 248; } //Bikers
							//else if(level == 13) { PlayerInfo[para1][pChar] = 174; } //SFR
							//else if(level == 14) { PlayerInfo[para1][pChar] = 122; } //DNG
							else if(level == 15) { PlayerInfo[para1][pChar] = 110;	gTeam[para1] = 15;	} //Vagos
							else if(level == 16) { PlayerInfo[para1][pChar] = 115;	gTeam[para1] = 16;	} //Aztecas
							else if(level == 17) { PlayerInfo[para1][pChar] = 104;	gTeam[para1] = 17;	} //Ballas
							else if(level == 18) { PlayerInfo[para1][pChar] = 271;	gTeam[para1] = 18;	} //Grove
							PlayerInfo[para1][pRank] = 6;
							SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
						}
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "[WtfCs]Nu Esti Autorizat Sa Folosesti Aceasta Comanda!");
			}
		}
		return 1;
	}

188.212.105.249:7777
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.