stock MinhaOrg(playerid)
{
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", "");
return 1;
}
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;
}
stock DelMembro(giveid)
{
new org[128];
format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[Player[giveid][pMember]]);
for(new i=0;i<sizeof(OrgsCargos);i++)
if(strcmp(dini_Get(org,OrgsCargos[i]),Player[giveid][pName],true)==0)
return dini_Set(org,OrgsCargos[i],"Nenhum");
return 1;
}
dcmd_orgs(playerid, params[])
{
#pragma unused params
new org[128],org2[128],string[2048],tmp[32],giveid;
for(new i = 1; i < MAX_ORGS; ++i)
{
format(org,128,"/RPG/orgs/%s.ini",OrgsNamesSmall[i]);
format(tmp,32,"%s",dini_Get(org, OrgsCargos[0]));
/*if(strcmp(tmp,"Nenhum",true)==0 || strlen(tmp) < 3)
{
format(org2,128,"{C2A2DA}%s: Nenhum\n",OrgsNames[i]);
continue;
}*/
if(strlen(tmp) < 3)
tmp = "Ninguйm";
giveid = ReturnUser(tmp);
if(IsPlayerConnected(giveid))
format(org2,128,"{C2A2DA} %d >> %s: %s - {00D900}Online\n", i, OrgsNames[i], tmp);
else
format(org2,128,"{C2A2DA} %d >> %s: %s - {AA3333}Offline\n", i, OrgsNames[i], tmp);
strcat(string, org2);
}
#pragma unused params
return ShowPlayerDialog(playerid, 10000, DIALOG_STYLE_MSGBOX, "Organizaзхes", string, "Fechar", "");
}
use o search existem trilhoes de topicos sobre o mesmo assunto criados em menos de 1 semana.
Alguns Topicos: https://sampforum.blast.hk/showthread.php?tid=321551 https://sampforum.blast.hk/showthread.php?tid=321417 https://sampforum.blast.hk/showthread.php?tid=320410 |
Exclua a sua pasta de includes e coloque esta! e sinta a magica.. Hehe
Includes da Salvaзгo |
Exclua a sua pasta de includes e coloque esta! e sinta a magica.. Hehe
Includes da Salvaзгo |
A vlw, ae eu acabei de sentir a Diferenзa olha minha diferenзa: erro 19: File or Fuction is not found", vlw mesmo... :S
|