27.12.2010, 11:11
Pessoal como crio uma organizaзгo e coloco por exemplo um jogador como dono da organizaзгo,e outro com outro cargo??
if(PlayerInfo[playerid][pMember] == id da organizaзгo || PlayerInfo[playerid][pLeader] == id da organizaзгo)
{
//Conteъdo!
return 1;
}
if (strcmp(cmd, "/darlider", 1) == 0)
{
if (IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Use: /darlider id/nome organizaзхes de 1 a ||");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if (level > mбximo de id das organizaзхes || level < 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "Caso o jogador erre o nъmero aparece esta frase!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= level dos administradores que usarгo o comando)
{
if (IsPlayerConnected(para1))
{
if (para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* %s lhe deu o direito administraзгo profissional, digite /rg.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s й o novo lнder administrativo profissional (%d).", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if (level == 0)
{
PlayerInfo[para1][pChar] = 0;
}
else if (level == 1)
{
PlayerInfo[para1][pChar] = 265; gTeam[para1] = 2;
}
else if (level == 2)
{
PlayerInfo[para1][pChar] = 286; gTeam[para1] = 2;
}
else if (level == 3)
{
PlayerInfo[para1][pChar] = 287; gTeam[para1] = 2;
}
else if (level == 4)
{
PlayerInfo[para1][pChar] = 70; gTeam[para1] = 4;
}
else if (level == 5)
{
PlayerInfo[para1][pChar] = 104; gTeam[para1] = 5;
}
else if (level == 6)
{
PlayerInfo[para1][pChar] = 270; gTeam[para1] = 5;
}
else if (level == 17)
{
PlayerInfo[para1][pChar] = 294; gTeam[para1] = 5;
}
else if (level == 7)
{
PlayerInfo[para1][pChar] = 147; gTeam[para1] = 7;
}
else if (level == 8)
{
PlayerInfo[para1][pChar] = 249; gTeam[para1] = 8;
}
else if (level == 9)
{
PlayerInfo[para1][pChar] = 17; gTeam[para1] = 9;
}
else if (level == 12)
{
PlayerInfo[para1][pChar] = 108; gTeam[para1] = 5;
}
else if (level == 13)
{
PlayerInfo[para1][pChar] = 248; gTeam[para1] = 5;
}
else if (level == 14)
{
PlayerInfo[para1][pChar] = 112; gTeam[para1] = 2;
}
else if (level == 15)
{
PlayerInfo[para1][pChar] = 115; gTeam[para1] = 5;
}
else if (level == 16)
{
PlayerInfo[para1][pChar] = 117; gTeam[para1] = 5;
}
else if (level == 18)
{
PlayerInfo[para1][pChar] = 291; gTeam[para1] = 5;
}
else if (level == 19)
{
PlayerInfo[para1][pChar] = skin; gTeam[para1] = tipo;
}
PlayerInfo[para1][pLeader] = level;
PlayerInfo[para1][pMember] = level;
PlayerInfo[para1][pRank] = 6;
PlayerInfo[para1][pTeam] = gTeam[para1];
PlayerInfo[para1][pModel] = PlayerInfo[para1][pChar];
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Sem Autorizaзгo.");
}
return 1;
}