[POMOC]/stats i /ban

Započeo Dane, Jun 15, 2011, 14:26:05 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GF(prevedeni)
Detaljan opis problema:Ovako ja nezz kako da stavim da kad nekom dadnem BAN da to izgleda igraču ovako: http://www.zaslike.com/files/04cphnvvl8pzwigy1q1.png     a kako da stavim ovo za /stats(/podaci) da bude ovako isto et malo drugačije Å¡ta nemam da izbriÅ¡em: http://www.zaslike.com/files/y9laoatdilz6m0fe2g0.png
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

Dio skripte: ?? postaj komande /ban i /stats pa cu uradit tako da ti bude.

Evo za /ban: if(strcmp(cmd, "/ban", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /ban [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s je banan od %s, razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s je banan od %s, razlog: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
PlayerInfo[giveplayerid][pLevel] = -999;
Ban(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}


A evo za /stats(/podaci): if (strcmp(cmd, "/podaci", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged[playerid] != 0)
{
ShowStats(playerid,playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Igrac %s vadi svoju osobnu iskaznicu i gleda u podatke.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ulogiran/a !");
}
}
return 1;
}

OFF:Vidim da neigram samo ja na NL na ovom forumu

ON:Koristi SendClientMessage(playerid, boja, "text"); da to napravis
Poslednja Izmena: Jun 15, 2011, 15:52:07 POSLE PODNE od FireMan

Oće mi neko napravit(pomoc) ili??

Dao sam ti odgovor u gornjem postu,sta bzvz spammas samo dodas u komandu ban SendClientMessage(playerid, boja, "text");

Zar je to tako tesko

Idi u GM,CTRL+F i kucaj Public ShowStats
Kad to nadjes,kopiraj i daj nam ovde...

Poslednja Izmena: Jun 15, 2011, 15:58:49 POSLE PODNE od Mario_

Evo ako mislite na ovo:
public ShowStats(playerid,targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new cash =  GetPlayerMoney(targetid);
new atext[20];
if(PlayerInfo[targetid][pSex] == 1) { atext = "Musko"; }
else if(PlayerInfo[targetid][pSex] == 2) { atext = "Zensko"; }
  new otext[20];
if(PlayerInfo[targetid][pOrigin] == 1) { otext = "Hrvatska"; }
else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Srbija"; }
else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Makedonija"; }
else if(PlayerInfo[targetid][pOrigin] == 4) { otext = "Crna Gora"; }
else if(PlayerInfo[targetid][pOrigin] == 5) { otext = "Slovenija"; }
else if(PlayerInfo[targetid][pOrigin] == 6) { otext = "BiH"; }
new ttext[20];
if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civilian"; }
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Policija"; }
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "National Guard"; }
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Bolnica"; }
else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Grove Mafia"; }
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "UnderGroundRacer's"; }
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "Licenseri"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12) { ttext = "Yakuza"; }
new dtext[20];
if(STDPlayer[targetid] == 1) { dtext = "Chlamydia"; }
else if(STDPlayer[targetid] == 2) { dtext = "Gonorrhea"; }
else if(STDPlayer[targetid] == 3) { dtext = "Syphilis"; }
else { dtext = "None"; }
    new ftext[20];
    if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
{ ftext = "Firemen/Paramedics"; }
  else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
{ ftext = "La Cosa Nostra"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
{ ftext = "Grove Mafia"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
{ ftext = "License Faction"; }
else
{ ftext = "None"; }
new f2text[20];
    if(PlayerInfo[targetid][pFMember] < 255) { f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName]; }
else { f2text = "None"; }
    new rtext[64];
    if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
    {
        if(PlayerInfo[targetid][pRank] == 1) { rtext = "NoviClan"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "MladjiClan"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "StarijiClan"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "PodLider"; }
  else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Lider"; }
else { rtext = "NoviClan"; }
}
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "PD.Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "PD.Policajac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "PD.Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "PD.Kapetan"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "PD.Porucnik"; }
        else if(PlayerInfo[targetid][pRank] == 6) { rtext = "PD.Direktor"; }
else { rtext = "PD.Ucenik"; }
}
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "FBI.Agent"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "FBI.Presretac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "FBI.Tajni Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "FBI.Cobra"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "FBI.Zamenik"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "FBI.Direktor"; }
else { rtext = "FBI.Agent"; }
}
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "S:W:A:T.Vojnik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "S:W:A:T.Casnik"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "S:W:A:T.Deserter"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "S:W:A:T.General"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "S:W:A:T.Agent"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "S:W:A:T.Pukovnik"; }
else { rtext = "S:W:A:T.Vojnik"; }
}
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Freelancer"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Marksman"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Vice-Director"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
else { rtext = "Freelancer"; }
}
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "UGR NoviClan"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "UGR LocalBandit"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "UGR Bnadit"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "UGR Spijun"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "UGR Podlider"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "UGR Lider."; }
else { rtext = "SkinHeads NoviClan"; }
}
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)//NR Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "MD.Brat/Sestra"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "MD.Doktor"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "MD.Kirurg"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "MD.Spec.Kirurg"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "MD.Zamjenik"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "MD.Upravitelj"; }
else { rtext = "MD.Brat/Sestra"; }
}
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Taxi Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi LocalVozac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Taxi Vozac"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Taxi Clan "; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Taxi PodLider"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Lider"; }
else { rtext = "Taxi Ucenik"; }
}
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12)//Yakuza Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Yakuza Vozac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Mafijas"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Profesionalac "; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Yakuza PodLider"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Yakuza Lider"; }
else { rtext = "Taxi Ucenik"; }
}
else if(IsAnInstructor(targetid))//grove mafia Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "LIC.Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "LIC.Instruktor"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "LIC.Stariji Instruktor"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "LIC.Pro Instruktor"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "LIC.Zamjenik"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "LIC.Leader"; }
else { rtext = "LIC.Ucenik"; }
}
else
{
    rtext = "None";
}
        new jtext[20];
        if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
        else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
        else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
        else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drugs Dealer"; }
        else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jackert"; }
        else if(PlayerInfo[targetid][pJob] == 6) { jtext = "TuningRace Club"; }
        else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Car Mechanic"; }
        else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
        else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Arms Dealer"; }
        else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
        else if(PlayerInfo[targetid][pJob] == 14) { jtext = "GradonaVozac"; }
        else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
        else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Donator"; }
else if(PlayerInfo[targetid][pJob] == 18) { jtext = "Postar"; }
        else { jtext = "None"; }
new drank[20];
if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Donator"; }
else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Super Donator"; }
else { drank = "None"; }
new married[20];
strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
        new age = PlayerInfo[targetid][pAge];
new ptime = PlayerInfo[targetid][pConnectTime];
new lotto = PlayerInfo[targetid][pLottoNr];
new deaths = PlayerInfo[targetid][pDeaths];
new crimes = PlayerInfo[targetid][pCrimes];
  new arrests = PlayerInfo[targetid][pArrested];
new drugs = PlayerInfo[targetid][pDrugs];
new mats = PlayerInfo[targetid][pMats];
new level = PlayerInfo[targetid][pLevel];
new exp = PlayerInfo[targetid][pExp];
new kills = PlayerInfo[targetid][pKills];
new pnumber = PlayerInfo[targetid][pPnumber];
new account = PlayerInfo[targetid][pAccount];
new nxtlevel = PlayerInfo[targetid][pLevel]+1;
new expamount = nxtlevel*levelexp;
new costlevel = nxtlevel*levelcost;//10k for testing purposes
new housekey = PlayerInfo[targetid][pPhousekey];
new bizkey = PlayerInfo[targetid][pPbiskey];
new intir = PlayerInfo[targetid][pInt];
new local = PlayerInfo[targetid][pLocal];
new Float:shealth = PlayerInfo[targetid][pSHealth];
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 coordsstring[256];
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_DOBRA,coordsstring);
format(coordsstring, sizeof(coordsstring), "Level:[%d] Spol:[%s] God:[%d] Drz:[%s] SpawnHealth:[%.1f] Novaca:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "DonateRank:[%s] OzenjenSa:[%s] SatiIgranja:[%d] LottoNr:[%d]", drank,married,ptime,lotto);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "KriminalaPocinjenih:[%d] TimesArrested:[%d] Posao:[%s]", crimes,arrests,jtext);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "Ubojstva:[%d] Smrti:[%d] SljedeciLvl:[$%d] Respect:[%d/%d] Obitelj:[%s]",kills,deaths,costlevel,exp,expamount,f2text);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "Droge:[%d] Materiali:[%d] Disease:[%s] Organizacija:[%s] Rank:[%s]",drugs,mats,dtext,ttext,rtext);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(coordsstring, sizeof(coordsstring), "House kljuc [%d] Business kljuc [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,HireCar[targetid],intir,local);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}