22.12.2011, 01:00
Entao, gostaria de saber se posso dividi-la em 2 comandos... No gamemode tem o /rg, quero dividir as informaзoes com outro comando... й possivel?
forward RG2(playerid, targetid);
public RG2(playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new age = PlayerInfo[targetid][pAge];
new ptime = PlayerInfo[targetid][pConnectSeconds];
new drugs = PlayerInfo[targetid][pDrugs];
new mats = PlayerInfo[targetid][pMats];
new level = PlayerInfo[targetid][pLevel];
new exp = PlayerInfo[targetid][pExp];
new pnumber = PlayerInfo[targetid][pPnumber];
new account = PlayerInfo[targetid][pAccount];
new nxtlevel = PlayerInfo[targetid][pLevel]+1;
new expamount = nxtlevel*levelexp;
new housekey = PlayerInfo[targetid][pPhousekey];
new bizkey = PlayerInfo[targetid][pPbiskey];
new intir = PlayerInfo[targetid][pInt];
new virworld = GetPlayerVirtualWorld(targetid);
new local = PlayerInfo[targetid][pLocal];
new swatr[20];
if(PlayerInfo[targetid][pSwat] == 1) { swatr = "Operative"; }
else if(PlayerInfo[targetid][pSwat] == 2) { swatr = "Instructor"; }
else if(PlayerInfo[targetid][pSwat] == 3) { swatr = "Team Sub-Leader"; }
else if(PlayerInfo[targetid][pSwat] == 4) { swatr = "Team Leader"; }
else { swatr = "None"; }
new Float:health;
new name[MAX_PLAYER_NAME];
GetPlayerName(targetid, name, sizeof(name));
GetPlayerHealth(targetid,health);
new Float:px,Float:py,Float:pz;
GetPlayerPos(targetid, px, py, pz);
new Float:armour;
GetPlayerArmour(playerid, armour);
new Playersip[64];
GetPlayerIp(playerid, Playersip, sizeof(Playersip));
new text1[20];
new text2[20];
new text3[20];
new text4[20];
new text5[20];
if(PlayerInfo[targetid][pCarLic]) { text1 = "P"; } else { text1 = "N/A"; }
if(PlayerInfo[targetid][pFlyLic]) { text2 = "P"; } else { text4 = "N/A"; }
if(PlayerInfo[targetid][pBoatLic]) { text3 = "P"; } else { text2 = "N/A"; }
if(PlayerInfo[targetid][pTruckLic]) { text4 = "P"; } else { text3 = "N/A"; }
if(PlayerInfo[targetid][pGunLic]) { text5 = "P"; } else { text5 = "N/A"; }
new warned = PlayerInfo[targetid][pWarned];
format(SkillBase, sizeof(SkillBase), " Nome: %s | Carteira: [$%d] Banco: [$%d] Tel: [%d] | VipPoints [%d] ", name, cash,account,pnumber,PlayerInfo[targetid][pVipPoints]);
SendClientMessage(playerid, 0x85A7B7AA,SkillBase);
format(SkillBase, sizeof(SkillBase), " Level: [%d] Respeito: [%d/%d] Emprego: [%s] | Licenзas - Carro: [%s] Arma: [%s] Barco: [%s] Voo: [%s] | Caminhгo: [%s]", level , exp, expamount, jtext, text1, text5, text3, text2, text4);
SendClientMessage(playerid, 0x85A7B7AA,SkillBase);
format(SkillBase, sizeof(SkillBase), " Drogas: [%dg] Materiais: [%d] | Organizaзгo: [%s] Cargo: [%s] | Conectado: [%d] Fome:[%.1f] Procurado:[%d]",drugs,mats,ttext,rtext,(ptime / 3600), PlayerInfo[targetid][pComida], PlayerInfo[targetid][pWantedLevel]);
SendClientMessage(playerid, 0x85A7B7AA,SkillBase);
format(SkillBase, sizeof(SkillBase), " Vida: [%.1f] Colete: [%.1f] | Unlogin: [%s] Interior: [%d] VW: [%d] Local: [%d] Skin1: [%d] Skin2: [%d]", health, armour, PlayerInfo[targetid][pWhyLeft], intir, virworld, local, PlayerInfo[targetid][pSkin1], PlayerInfo[targetid][pSkin2]);
SendClientMessage(playerid, 0x85A7B7AA,SkillBase);
format(SkillBase, sizeof(SkillBase), " Casa: [%d] Empresa: [%d] | Idade: [%danos] Modelo: [%d] Avisos: [%d] Admin: [%d] УculosID: [%d] BandanaID: [%d], ChapeuID: [%d]", housekey,bizkey,age,GetPlayerSkin(targetid),warned,PlayerInfo[targetid][pAdmin],PlayerInfo[targetid][pOculos],PlayerInfo[targetid][pBandana],PlayerInfo[targetid][pChapeuID]);
SendClientMessage(playerid, 0x85A7B7AA,SkillBase);
if (PlayerInfo[targetid][pInvestimento] > 0)
{
format(SkillBase, sizeof(SkillBase), "Investimento: [%s] ID da empresa: [%d]", invjustintipo, PlayerInfo[targetid][pInvestimento]);
SendClientMessage(playerid, 0x85A7B7AA,SkillBase);
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
format(SkillBase, sizeof(SkillBase), "CarroID1: [%i] || CarroID2: [%i]", PlayerInfo[targetid][pPcarkey],PlayerInfo[targetid][pPcarkey2]);
SendClientMessage(playerid, COLOR_YELLOW,SkillBase);
format(basegostosa, sizeof(basegostosa), "Maconha: %ig | Crack: %ig | LSD: %ig | Cocaina: %ig", PlayerInfo[targetid][pMaconha], PlayerInfo[targetid][pCrack],PlayerInfo[targetid][pLSD], PlayerInfo[targetid][pCocaina]);
SendClientMessage(playerid, COLOR_GRAD2, basegostosa);
if(PlayerInfo[targetid][pNovaDroga] > 0)
{
format(basegostosa, sizeof(basegostosa), "Droga Criada 1: %s: %ig", PlayerInfo[targetid][pNovaDrogaNome],PlayerInfo[targetid][pNovaDroga]);
SendClientMessage(playerid, COLOR_GRAD3, basegostosa);
}
if(PlayerInfo[targetid][pNovaDroga2] > 0)
{
format(basegostosa, sizeof(basegostosa), "Droga Criada 2: %s: %ig", PlayerInfo[targetid][pNovaDrogaNome2],PlayerInfo[targetid][pNovaDroga2]);
SendClientMessage(playerid, COLOR_GRAD3, basegostosa);
}
SendClientMessage(playerid, COLOR_WHITE, "[:] Produtos quimicos [:]");
format(basegostosa, sizeof(basegostosa), "Merla: %ig | Cetamina: %ig | Anfetamina: %ig | Quetamina: %ig | Metanfetamina: %ig", PlayerInfo[targetid][pMistura1],PlayerInfo[targetid][pMistura2],PlayerInfo[targetid][pMistura3],PlayerInfo[targetid][pMistura4],PlayerInfo[targetid][pMistura5]);
SendClientMessage(playerid, COLOR_GRAD2, basegostosa);
}
}
return 1;
}
if(!strcmp(cmdtext,"/bolso", true))
{
RG2(playerid, playerid);
return 1;
}