Jump to content
  • 0

Salutare am si eu 2 intrebari.


NoRbY.SM

Question

Salutare, Am 2 intrebari : Cum as putea pune Skinurile pe rank (Ex : cand dau /giverank 2 sa ii puna un skin anume)

Si a doua ar fi cand dau /invite sau /makeleader sa ii seteze automat (team-u) sa nu mai dau /setteam . Multumesc anticipat :)

http://b-zone.ro/forum/

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

1. [pawn]if(PlayerInfo[playerid][pRank] == 1{SetPlayerSkin(playerid,ID);}

    if(PlayerInfo[playerid][pRank] == 2{SetPlayerSkin(playerid,ID);}[/pawn]

Desigur asta le pui in functie de factiuni,deci o sa pui

[pawn]if(PlayerInfo[playerid][pMember]== ID||PlayerInfo[playerid][pRank] == 1{SetPlayerSkin(playerid,ID);}[/pawn]

2.

La comanda /makeleader trebuie sa ai ceva gen if(level == 1) si adaugi PlayerInfo[playerid][pTeam] = level;

gXvsYS
Link to comment
Share on other sites

La /giverank am inteles mersi mult. Doar ca am vreo 16 factiuni si ar iesi un haos daca as face asa..

Dar la /ml(makeleader) am asa :

	if(strcmp(cmd, "/ml", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ml [playerid/PartOfName] [Number(1-15)]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strvalEx(tmp);
			if(level > 16 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Dont go below number 0, or above number 15!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 5)
			{
			    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;
			            }
						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) { gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; PlayerInfo[para1][pChar] = 280; } //Police Force
						else if(level == 2) { gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; PlayerInfo[para1][pChar] = 286; } //FBI/ATF
						else if(level == 3) { gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; PlayerInfo[para1][pChar] = 179; } //National Guard
						else if(level == 4) { gTeam[para1] = 4; PlayerInfo[para1][pTeam] = 4; PlayerInfo[para1][pChar] = 228; } //Fire/Ambulance
						else if(level == 5) { PlayerInfo[para1][pChar] = 126; } 
						else if(level == 6) { PlayerInfo[para1][pChar] = 270; } 
						else if(level == 7) { PlayerInfo[para1][pChar] = 295; } 
						else if(level == 8) { PlayerInfo[para1][pChar] = 294; } 
						else if(level == 9) { PlayerInfo[para1][pChar] = 227; } 
						else if(level == 10) { PlayerInfo[para1][pChar] = 61; } 
						else if(level == 11) { PlayerInfo[para1][pChar] = 171; } 
						else if(level == 12) { PlayerInfo[para1][pChar] = 113; } 
						else if(level == 13) { PlayerInfo[para1][pChar] = 112; } 
						else if(level == 15) { PlayerInfo[para1][pChar] = 111; } 
						else if(level == 14) { PlayerInfo[para1][pChar] = 268; } 
						else if(level == 16) { PlayerInfo[para1][pChar] = 296; } 
					    PlayerInfo[para1][pRank] = 6;
					    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
					}
				}//not connected
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
			}
		}
		return 1;
	}

Unde anume sa adaug? Mersi anticipat

http://b-zone.ro/forum/

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.