stats problem
#1

hello guys i make some textdraw stats and i add this cmd i go in game and write /stats tell me unknow command this is the cod help me tnx

Quote:

if(strcmp(cmd, "/stats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
if(GledaStats[playerid] == STATS_nemoze)
{


new cash = GetPlayerMoney(targetid);
new atext[20];
if(PlayerInfo[targetid][pSex] == 1) { atext = "Masko"; }
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 = "Bosna"; }
else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Makedonija"; }
else if(PlayerInfo[targetid][pOrigin] == 4) { otext = "Srbija"; }
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 = "MBI 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] == { ttext = "Hitmen"; }
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "SkinHeads"; }
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "Licenseri"; }
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)//MBI Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "MBI.Agent"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "MBI.Presretac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "MBI.Tajni Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "MBI.Cobra"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "MBI.Zamjenik"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "MBI.Direktor"; }
else { rtext = "MBI.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] == 5 || PlayerInfo[targetid][pLeader] == 5)//LCN Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Assistant"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "D'Caprio"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Capo"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Boss"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Master Boss"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "The GodFather"; }
else { rtext = "Assistant"; }
}
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == //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 = "SkinHeads NoviClan"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "SkinHeads LocalBandit"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "SkinHeads Bnadit"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "SkinHeads Spijun"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "SkinHeads Podlider"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "SkinHeads 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.Hirurg"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "MD.Spec.Hirurg"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "MD.Z.Direktor"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "MD.Direktor"; }
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(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] == { 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] == 1 { jtext = "Postar"; }
else if(PlayerInfo[targetid][pJob] == 31) { jtext = "Rudar"; }
else if(PlayerInfo[targetid][pJob] == 32) { jtext = "Sumar"; }
else { jtext = "None"; }
new drank[20];
if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Easy User"; }
else if(PlayerInfo[targetid][pDonateRank] == 2) { drank = "Medium User"; }
else if(PlayerInfo[targetid][pDonateRank] == 3) { drank = "Hard User"; }
else if(PlayerInfo[targetid][pDonateRank] == 4) { drank = "Strong User"; }
else if(PlayerInfo[targetid][pDonateRank] == 5) { drank = "Very Strong User"; }
else { drank = "None"; }
new married[20];
strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
new poenid = PlayerInfo[targetid][pDonatorPoeni];
new age = PlayerInfo[targetid][pAge];
new ptime = PlayerInfo[targetid][pConnectTime];
new drugs = PlayerInfo[targetid][pDrugs];
new mats = PlayerInfo[targetid][pMats];
new fishes = PlayerInfo[targetid][pFishes];
new lotto = PlayerInfo[targetid][pLottoNr];
new wanted = WantedLevel[targetid];
new level = PlayerInfo[targetid][pLevel];
new pnumber = PlayerInfo[targetid][pPnumber];
new account = PlayerInfo[targetid][pAccount];
new warns = PlayerInfo[targetid][pWarns];
new name[MAX_PLAYER_NAME];
GetPlayerName(targetid, name, sizeof(name));
new Floatx,Floaty,Floatz;
GetPlayerPos(targetid, px, py, pz);
new info[1300],string[128],godina,mesec,dan,sati,minute,sekunde;
getdate(godina, mesec, dan), gettime(sati, minute, sekunde);
new statsstring[400];

format(statsstring,sizeof(statsstring), "Ime i Prezime:[%s]",name);
TextDrawSetString(Textdraw2[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Godini:[%d]",age);
TextDrawSetString(Textdraw3[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Drzava:[%s]",otext);
TextDrawSetString(Textdraw4[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Vo brak so:[%s]",married);
TextDrawSetString(Textdraw5[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Broj:[%d]",pnumber);
TextDrawSetString(Textdraw6[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Kes Pari:[%d]",cash);
TextDrawSetString(Textdraw7[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Level:[%d]",level);
TextDrawSetString(Textdraw8[playerid],statsstring);
format(statsstring,sizeof(statsstring), "ORG/BANDA/MAFIJA:[%s]",ttext);
TextDrawSetString(Textdraw9[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Rank:[%s]",rtext);
TextDrawSetString(Textdraw10[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Droga:[%d]",drugs);
TextDrawSetString(Textdraw11[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Matrijali:[%d]",mats);
TextDrawSetString(Textdraw12[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Seme-Droga:[100]");
TextDrawSetString(Textdraw13[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Matrijali-Paket:[100]");
TextDrawSetString(Textdraw14[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Rabotna Kniska:[0]");
TextDrawSetString(Textdraw15[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Bombi:[%d]",bomb);
TextDrawSetString(Textdraw16[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Pari vo Banka:[%d]",account);
TextDrawSetString(Textdraw17[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Pari vo Kreditna karticka:[0]");
TextDrawSetString(Textdraw18[playerid],statsstring);
format(statsstring,sizeof(statsstring), "PINKOD na kreditna Karticka:[3343]");
TextDrawSetString(Textdraw19[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Lotto Broj:[%d]",lotto);
TextDrawSetString(Textdraw20[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Donator Poeni:[%d]",poenid);
TextDrawSetString(Textdraw21[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Donator Rank:[%d]",drank);
TextDrawSetString(Textdraw22[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Opomeni:[%d]",warns);
TextDrawSetString(Textdraw23[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Wanted:[%d]",wanted);
TextDrawSetString(Textdraw24[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Datum:[%d/%s%d/%s%d]",dan, ((mesec < 10) ? ("0") : ("")), mesec, (godina < 10) ? ("0") : (""), godina);
TextDrawSetString(Textdraw27[playerid],statsstring);
format(statsstring,sizeof(statsstring), "Sat:[%s%d:%s%d:%s%d]",(sati < 10) ? ("0") : (""), sati, (minute < 10) ? ("0") : (""), minute, (sekunde < 10) ? ("0") : (""), sekunde);
TextDrawSetString(Textdraw28[playerid],statsstring);

TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
TextDrawShowForPlayer(playerid, Textdraw2[playerid]);
TextDrawShowForPlayer(playerid, Textdraw3[playerid]);
TextDrawShowForPlayer(playerid, Textdraw4[playerid]);
TextDrawShowForPlayer(playerid, Textdraw5[playerid]);
TextDrawShowForPlayer(playerid, Textdraw6[playerid]);
TextDrawShowForPlayer(playerid, Textdraw7[playerid]);
TextDrawShowForPlayer(playerid, Textdraw8[playerid]);
TextDrawShowForPlayer(playerid, Textdraw9[playerid]);
TextDrawShowForPlayer(playerid, Textdraw10[playerid]);
TextDrawShowForPlayer(playerid, Textdraw11[playerid]);
TextDrawShowForPlayer(playerid, Textdraw12[playerid]);
TextDrawShowForPlayer(playerid, Textdraw13[playerid]);
TextDrawShowForPlayer(playerid, Textdraw14[playerid]);
TextDrawShowForPlayer(playerid, Textdraw15[playerid]);
TextDrawShowForPlayer(playerid, Textdraw16[playerid]);
TextDrawShowForPlayer(playerid, Textdraw17[playerid]);
TextDrawShowForPlayer(playerid, Textdraw18[playerid]);
TextDrawShowForPlayer(playerid, Textdraw19[playerid]);
TextDrawShowForPlayer(playerid, Textdraw20[playerid]);
TextDrawShowForPlayer(playerid, Textdraw21[playerid]);
TextDrawShowForPlayer(playerid, Textdraw22[playerid]);
TextDrawShowForPlayer(playerid, Textdraw23[playerid]);
TextDrawShowForPlayer(playerid, Textdraw24[playerid]);
TextDrawShowForPlayer(playerid, Textdraw25[playerid]);
//TextDrawShowForPlayer(playerid, Textdraw26);
TextDrawShowForPlayer(playerid, Textdraw27[playerid]);
TextDrawShowForPlayer(playerid, Textdraw28[playerid]);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s ja poglednuva svojata licna karta", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 100.0, 5000);
GledaStats[playerid] = STATS_moze;
TogglePlayerControllable(playerid, 0);
}
else
{
TextDrawHideForPlayer(playerid, Textdraw0[playerid]);
TextDrawHideForPlayer(playerid, Textdraw1[playerid]);
TextDrawHideForPlayer(playerid, Textdraw2[playerid]);
TextDrawHideForPlayer(playerid, Textdraw3[playerid]);
TextDrawHideForPlayer(playerid, Textdraw4[playerid]);
TextDrawHideForPlayer(playerid, Textdraw5[playerid]);
TextDrawHideForPlayer(playerid, Textdraw6[playerid]);
TextDrawHideForPlayer(playerid, Textdraw7[playerid]);
TextDrawHideForPlayer(playerid, Textdraw8[playerid]);
TextDrawHideForPlayer(playerid, Textdraw9[playerid]);
TextDrawHideForPlayer(playerid, Textdraw10[playerid]);
TextDrawHideForPlayer(playerid, Textdraw11[playerid]);
TextDrawHideForPlayer(playerid, Textdraw12[playerid]);
TextDrawHideForPlayer(playerid, Textdraw13[playerid]);
TextDrawHideForPlayer(playerid, Textdraw14[playerid]);
TextDrawHideForPlayer(playerid, Textdraw15[playerid]);
TextDrawHideForPlayer(playerid, Textdraw16[playerid]);
TextDrawHideForPlayer(playerid, Textdraw17[playerid]);
TextDrawHideForPlayer(playerid, Textdraw18[playerid]);
TextDrawHideForPlayer(playerid, Textdraw19[playerid]);
TextDrawHideForPlayer(playerid, Textdraw20[playerid]);
TextDrawHideForPlayer(playerid, Textdraw21[playerid]);
TextDrawHideForPlayer(playerid, Textdraw22[playerid]);
TextDrawHideForPlayer(playerid, Textdraw23[playerid]);
TextDrawHideForPlayer(playerid, Textdraw24[playerid]);
TextDrawHideForPlayer(playerid, Textdraw25[playerid]);
//TextDrawHideForPlayer(playerid, Textdraw26[playerid]);
TextDrawHideForPlayer(playerid, Textdraw27[playerid]);
TextDrawHideForPlayer(playerid, Textdraw28[playerid]);

GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "|%s ja stava vo dzep svojata licna karta.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 100.0, 5000);
GledaStats[playerid] = STATS_nemoze;
TogglePlayerControllable(playerid, 1);
}
}
else
{
SendClientMessage(playerid,-1, "{FF0000}[GLD] Greska:{FFFFFF}Ne ste logirani!");
}
}
return 1;
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)