Nгo sei o que tenho que colocar, de uma olhada nisso
ORGS
PHP код:
new OrgsCargos[][30] = {
"Lнder",
"Sub-lнder-1",
"Sub-lнder-2",
"Membro-1",
"Membro-2",
"Membro-3",
"Membro-4",
"Membro-5",
"Membro-6",
"Membro-7",
"Membro-8",
"Membro-9",
"Membro-10",
"Membro-11",
"Membro-12",
"Membro-13",
"Membro-14",
"Membro-15",
"Membro-16",
"Membro-17",
"Membro-18",
"Membro-19",
"Membro-20",
"Membro-21",
"Membro-22",
"Membro-23",
"Membro-24",
"Membro-25",
"Membro-26",
"Membro-27"
};
new OrgsNames[MAX_ORGS][24] = {
{"Nenhuma"},
{"Policia Militar"},
{"Policia Federal"},
{"Forзas Armadas"},
{"Bombeiros"},
{"Front Yard Ballas"},
{"Grove Street"},
{"Polнtico"},
{"Hitman"},
{"San News"},
{"Lowrider"},
{"San Fierro Riffa"},
{"Los Santos Vagos"},
{"MotorBikers"},
{"Guarda Municipal"},
{"Varrio Los Aztecas"},
{"Mafia Russa"},
{"Yakuza"},
{"Drifters"},
{"Bloods"},
{"Creeps"},
{"BOPE"},
{"Alqaeda"},
{"Policia Civil"},
{"Kings"}
};
new OrgsNamesSmall[MAX_ORGS][24] = {
{"Nenhuma"},
{"PM"},
{"PF"},
{"FA"},
{"Bombeiros"},
{"Ballas"},
{"Grove"},
{"Politico"},
{"Hitman"},
{"SA News"},
{"Lowrider"},
{"Riffa"},
{"Vagos"},
{"Bikers"},
{"Guarda Municipal"},
{"Aztecas"},
{"Russa"},
{"Yakuza"},
{"Drifters"},
{"Bloods"},
{"Creeps"},
{"BOPE"},
{"Alqaeda"},
{"PC"},
{"Kings"}
};
new OrgsSalaries[MAX_ORGS] = {
0,
550,//PM
550,//PF
500,//FA
300,//BOMBEIROS
200,//BALLAS
200,//GROVE
700,//POLITICO
360,//HITMAN
410,//SA NEWS
200,//LOWRIDER
200,//RIFFA
200,//VAGOS
500,//BIKERS
400,//GUARDA MUNICIPAL
200,//AZTECAS
350,//RUSSA
350,//YAKUZA
200,//DRIFTERS
200,//BLOODS
200,//CREEPS
500,//BOPE
400,//ALQAEDA
200,//PC
200//KINGS
};
new OrgsColors[MAX_ORGS] = {
0xC0C0C077,
COLOR_PM,
COLOR_PF,
COLOR_FA,
COLOR_MEDICOS,
COLOR_BALLAS,
COLOR_GROOVE,
COLOR_PREF,
COLOR_HITMAN,
COLOR_SANEWS,
COLOR_LOWRIDERS,
COLOR_RIFA,
COLOR_VAGOS,
COLOR_BIKERS,
COLOR_MUNICIPAL,
COLOR_AZTECAS,
COLOR_RUSSA,
COLOR_YAKUZA,
COLOR_DRIFTERS,
COLOR_BLOODS,
COLOR_CREEPS,
COLOR_BOPE,
COLOR_ALQAEDA,
COLOR_PCIVIL,
COLOR_KINGS
};
new PixColors[MAX_ORGS] = {
0xC0C0C077,
COLOR_PMPIX,
COLOR_PFPIX,
COLOR_FAPIX,
COLOR_MEDICOSPIX,
COLOR_BALLASPIX,
COLOR_GROOVEPIX,
COLOR_PREFPIX,
COLOR_HITMANPIX,
COLOR_SANEWSPIX,
COLOR_LOWRIDERSPIX,
COLOR_RIFAPIX,
COLOR_VAGOSPIX,
COLOR_BIKERSPIX,
COLOR_MUNICIPALPIX,
COLOR_AZTECASPIX,
COLOR_RUSSAPIX,
COLOR_YAKUZAPIX,
COLOR_DRIFTERSPIX,
COLOR_BLOODSPIX,
COLOR_CREEPSPIX,
COLOR_BOPEPIX,
COLOR_ALQAEDAPIX,
COLOR_PCIVILPIX,
COLOR_KINGSPIX
};
DAR LIDER PARA O PLAYER
PHP код:
dcmd_darlider(playerid, params[])
{
if(Player[playerid][pAdmin] < 6)
return SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem permissгo para usar este comando!");
new tmp[24], idx; tmp = strtok(params, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GREY, "[USO] /darlider [id/nick] [Number(1-22)]");
new level;
new year, month,day;
getdate(year, month, day);
new hour,minuite,second;
gettime(hour,minuite,second);
new giveid = ReturnUser(tmp);
tmp = strtok(params, idx);
level = strval(tmp);
if(level > 24 || level < 0)
return SendClientMessage(playerid, COLOR_RED,"[ERRO] Nъmeros entre 1 e 24");
if(IsPlayerConnected(giveid))
{
if(giveid != INVALID_PLAYER_ID)
{
if(Player[giveid][pMember] != 0)
return SendClientMessage(playerid, COLOR_LIGHTBLUE, "O jogador jб tem uma profissгo.");
Player[giveid][pLeader] = level;
if(Player[giveid][pAdmin] < 6)
{
format(thestring, sizeof(thestring), "%s lhe deu o direito administracгo profissional, digite /rg.", Player[playerid][pName]);
SendClientMessage(giveid, COLOR_LIGHTBLUE, thestring);
format(thestring, sizeof(thestring), "%s й o novo lнder administrativo da ORG %s (%d).", Player[giveid][pName], OrgsNames[level], level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, thestring);
ONDE FICA ARMEZENADO AS ORG
PHP код:
new org[128],org2[128],string[1024],Org[32],tmp[32],giveid;
format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[Player[playerid][pMember]]);
string = " ";
Org = OrgsNames[GetPlayerOrg(playerid)];
for(new i=0;i<sizeof(OrgsCargos);i++)
{
format(tmp,32,"%s",dini_Get(org,OrgsCargos[i]));
giveid = ReturnUser(tmp);
if(IsPlayerConnected(giveid))
format(org2,128,"{C2A2DA}%s - %s - {00D900}Online\n",OrgsCargos[i],dini_Get(org,OrgsCargos[i]));
else if(strcmp(dini_Get(org,OrgsCargos[i]),"Nenhum",true)==0)
format(org2,128,"{C2A2DA}%s - Nenhum\n",OrgsCargos[i]);
else
format(org2,128,"{C2A2DA}%s - %s - {AA3333}Offline\n",OrgsCargos[i],dini_Get(org,OrgsCargos[i]));
if(strlen(string) < 1000)
format(string,2048,"%s %s",string, org2);
}
ShowPlayerDialog(playerid, 24, DIALOG_STYLE_MSGBOX, Org, string, "Fechar", "");
}
stock AddMembro(giveid)
{
new org[128];
format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[Player[giveid][pMember]]);
if(!dini_Exists(org))
{
dini_Create(org);
for(new i=0;i<sizeof(OrgsCargos);i++)
{
if(i==0 && Player[giveid][pLeader] != 0)
dini_Set(org,"Lнder",Player[giveid][pName]);
else
dini_Set(org,OrgsCargos[i],"Nenhum");
}
}
else
{
new l;
if(Player[giveid][pRank] == 6)
l=0;
else if(Player[giveid][pRank] < 4)
l=3;
for(new i=l;i<sizeof(OrgsCargos);i++)
if(strcmp(dini_Get(org,OrgsCargos[i]),"Nenhum",true)==0)
return dini_Set(org,OrgsCargos[i],Player[giveid][pName]);
return SendClientMessage(giveid,COLOR_RED,"[ERRO] Esta organizaзгo jб atingiu o limite de membros.");
}
return 1;
}