[Pomoc]buylevel

Započeo ‹Fox›, Oktobar 05, 2010, 16:12:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

imam problem, imam stats i level i kad upisem /buylevel on mi da iduci level nemoram imati ni sve respecte ni nis i samo ukucam buylevel i iduci lvl sam jel mi mozete to rijesit?
evo komande:
if (strcmp(cmdtext, "/buylevel", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged[playerid] != 0)
{
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
if(PlayerInfo[playerid][pLevel] >= 0)
{
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new costlevel = nxtlevel*levelcost;//10k for testing purposes
new infostring[128];
if(GetPlayerMoney(playerid) < costlevel)
{
format(infostring, 128, "Nemas dovoljno novaca. ($%d)",costlevel);
SendClientMessage(playerid, COLOR_LIME, infostring);
return 1;
}
if (PlayerInfo[playerid][pRespect] < expamount)
{
format(infostring, 128, "Treba ti %d Respekta, trenutno imas [%d] !",expamount,PlayerInfo[playerid][pRespect]);
SendClientMessage(playerid, COLOR_LIME, infostring);
return 1;
}
else
{
new string[128];
format(string, sizeof(string), "~g~CESTITAMO~n~~w~Sada ste level %d", nxtlevel);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, (-costlevel));
PlayerInfo[playerid][pRespect] = 0;
PlayerInfo[playerid][pLevel]++;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
    PlayerInfo[playerid][pRespect] = expamount;
    new total = PlayerInfo[playerid][pExp];
    if(total > 0)
    {
        PlayerInfo[playerid][pRespect] = total;
    }
    else
    {
        PlayerInfo[playerid][pRespect] = 0;
    }
}
else
{
PlayerInfo[playerid][pRespect] = 0;
}
PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
GameTextForPlayer(playerid, string, 5000, 1);
format(infostring, 128, "Kupili ste level %d za ($%d). Upisite /upgrade", nxtlevel, costlevel);
SendClientMessage(playerid, COLOR_LIME, infostring);
format(infostring, 128, "Imate %d neiskoristena upgrade poena",PlayerInfo[playerid][gPupgrade]);
SendClientMessage(playerid, COLOR_LIME, infostring);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "   Nisi logiran !");
}
}
return 1;
}



if (strcmp(cmdtext, "/stats", true) == 0)
{
new atext[20];
if(PlayerInfo[playerid][pSex] == 1) { atext = "Musko"; }
else if(PlayerInfo[playerid][pSex] == 2) { atext = "Zensko"; }
new otext[20];
if(PlayerInfo[playerid][pDrzava] == 1) { otext = "Hrvatska"; }
else if(PlayerInfo[playerid][pDrzava] == 2) { otext = "Bosna"; }
else if(PlayerInfo[playerid][pDrzava] == 3) { otext = "Srbija"; }
else if(PlayerInfo[playerid][pDrzava] == 4) { otext = "Crna Gora"; }
else if(PlayerInfo[playerid][pDrzava] == 5) { otext = "Slovenija"; }
else if(PlayerInfo[playerid][pDrzava] == 6) { otext = "Ostalo"; }
new ttext[20];
if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Lijecnik"; }
else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civil"; }
else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Policajac"; }
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "Vojnik"; }
else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Lijecnik"; }
else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Yakuza"; }
else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "Reporter"; }
else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxist"; }
else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "Instruktor"; }
new dtext[20];
if(STDPlayer[playerid] == 1) { dtext = "Hepatitis"; }
else if(STDPlayer[playerid] == 2) { dtext = "Sida"; }
else if(STDPlayer[playerid] == 3) { dtext = "Sifilis"; }
else { dtext = "None"; }
    new ftext[20];
    if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
{ ftext = "Firemen/Paramedics"; }
  else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
{ ftext = "La Cosa Nostra"; }
else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
{ ftext = "Yakuza"; }
else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{ ftext = "License Faction"; }
else
{ ftext = "None"; }
new f2text[20];
    if(PlayerInfo[playerid][pFMember] < 255) {FamilyInfo[PlayerInfo[targetid][pFMember]]; }
else {f2text = "None"; }
    new rtext[64];
    if(gTeam[playerid] == 5 || PlayerInfo[playerid][pFMember] < 255)//The 2 Organisations
    {
        if(PlayerInfo[playerid][pRank] == 1) { rtext = "Outsider"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Associate"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Soldier"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Capo"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Underboss"; }
  else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Godfather"; }
else { rtext = "Outsider"; }
}
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
{
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Cadet"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Officer"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Sergeant"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Lieutenant"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Captain"; }
        else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Chief"; }
else { rtext = "Cadet"; }
}
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
{
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Professional Staff"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Special Agent Trainee"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Special Agent"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Special Agent in Charge"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Assistant Director in Charge"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Director"; }
else { rtext = "Intern"; }
}
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
{
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Private"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Sergeant"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Major"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Captain"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Lieutenant"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "General"; }
else { rtext = "Private"; }
}
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
{
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Freelancer"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Marksman"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Agent"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Special Agent"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Vice-Director"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Director"; }
else { rtext = "Freelancer"; }
}
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
{
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Intern"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Local Reporter"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Local Editor"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Network Anchor"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Network Editor"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Network Producer"; }
else { rtext = "Intern"; }
}
else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)//Taxi Company Ranks
{
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Trainee"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Taxi Rookie"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Cabbie"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Dispatcher"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Shift Supervisor"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Taxi Company Owner"; }
else { rtext = "Trainee"; }
}
else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
{
    if(PlayerInfo[playerid][pRank] == 1) { rtext = "Trainee"; }
else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Instructor"; }
else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Senior Instructor"; }
else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Manager"; }
else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Under Boss"; }
    else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Boss"; }
else { rtext = "Trainee"; }
}
else
{
    rtext = "None";
}
        new jtext[20];
        if(PlayerInfo[playerid][pJob] == 1) { jtext = "Detective"; }
        else if(PlayerInfo[playerid][pJob] == 2) { jtext = "Lawyer"; }
        else if(PlayerInfo[playerid][pJob] == 3) { jtext = "Whore"; }
        else if(PlayerInfo[playerid][pJob] == 4) { jtext = "Drugs Dealer"; }
        else if(PlayerInfo[playerid][pJob] == 5) { jtext = "Car Jacker"; }
        else if(PlayerInfo[playerid][pJob] == 6) { jtext = "News Reporter"; }
        else if(PlayerInfo[playerid][pJob] == 7) { jtext = "Car Mechanic"; }
        else if(PlayerInfo[playerid][pJob] == 8) { jtext = "Bodyguard"; }
        else if(PlayerInfo[playerid][pJob] == 9) { jtext = "Arms Dealer"; }
        else if(PlayerInfo[playerid][pJob] == 10) { jtext = "Car Dealer"; }
else if(PlayerInfo[playerid][pJob] == 12) { jtext = "Boxer"; }
        else if(PlayerInfo[playerid][pJob] == 14) { jtext = "Bus Driver"; }
        else if(PlayerInfo[playerid][pJob] == 15) { jtext = "Paper Boy"; }
        else if(PlayerInfo[playerid][pJob] == 16) { jtext = "Trucker"; }
        else { jtext = "None"; }
new drank[20];
if(PlayerInfo[playerid][pDonateRank] == 1) { drank = "Pocasni Clan"; }
else if(PlayerInfo[playerid][pDonateRank] >= 2) { drank = "Donator"; }
else { drank = "None"; }
new married[20];
strmid(married, PlayerInfo[playerid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
new deaths = PlayerInfo[playerid][pDeaths];
new arrests = PlayerInfo[playerid][pArrested];
new drugs = PlayerInfo[playerid][pDrugs];
new mats = PlayerInfo[playerid][pMats];
new level = PlayerInfo[playerid][pLevel];
new kills = PlayerInfo[playerid][pKills];
new account = PlayerInfo[playerid][pBankMoney];
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new expamount = nxtlevel*levelexp;
new housekey = PlayerInfo[playerid][pPhousekey];
new bizkey = PlayerInfo[playerid][pPbiskey];
new intir = PlayerInfo[playerid][pInt];
new local = PlayerInfo[playerid][pLocal];
new Float:health;
new name[24];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerHealth(targetid,health);
new Float:px,Float:py,Float:pz;
GetPlayerPos(targetid, px, py, pz);
new coordsstring1[128];
new coordsstring2[128];
new coordsstring3[128];
new coordsstring4[128];
new coordsstring5[128];
SendClientMessage(playerid, COLOR_GREEN,"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°");
format(coordsstring1, sizeof(coordsstring1),"*** Status Osobe: %s ***",name);
SendClientMessage(playerid, COLOR_MEDIUMAQUA,coordsstring1);
format(coordsstring2, sizeof(coordsstring2), "Level:[%d] Spol:[%s] Dob:[%d] Drzava:[%s] Novac:[$%d] Iznos Racuna:[$%d] Telefon:[%d]", level,atext,PlayerInfo[playerid][pAge],otext, GetPlayerMoney(playerid), account,PlayerInfo[playerid][pPnumber]);
SendClientMessage(playerid, COLOR_MEDIUMAQUA,coordsstring2);
format(coordsstring3, sizeof(coordsstring3), "Posao:[%s] Uhicen Puta:[%d] Ubojstava:[%d] Smrti:[%d] Team:[%s] Bolest:[%s]", jtext,arrests,kills,deaths,ttext,dtext);
SendClientMessage(playerid, COLOR_MEDIUMAQUA,coordsstring3);
format(coordsstring4, sizeof(coordsstring4), "Respecti:[%d/%d] Droga:[%d] Materiali:[%d] Organizacija:[%s] Rank:[%s] PayDay poena: %d/600", PlayerInfo[playerid][pRespect],expamount,drugs,mats,ftext,rtext, SecondsPlayed[playerid]);
SendClientMessage(playerid, COLOR_MEDIUMAQUA,coordsstring4);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(coordsstring5, sizeof(coordsstring5), "Kuca [%d] Business [%d] Renta [%d] int:[%d] lokal[%d]", housekey,bizkey,HireCar[playerid],intir,local);
SendClientMessage(playerid, COLOR_GRAD6,coordsstring5);
}
SendClientMessage(playerid, COLOR_GREEN,"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°");
return 1;
}

pa zasto ako pravis mode od nule ne radis sa ZCMD?

Kakav mode od 0 sta je s tobom, o bozee...

@topic expammount pogledaj
Aequam memento rebus in arduis servare mentem.

http://balkan-samp.com/forum/index.php?topic=13494.0

procitaj sve njegove teme..pa onda govori nekome nesta... o bozeeee :D
jos si SMOD i tako napadas ljude -_- cccc

Ovo je mod od 0? pMember, pLeader, pRank, gPlayerLogged, pCash i ostalo? Naravno da je mogao on na istu foru ko i GF ima.. ali, onda bi vjerojatno koristio pVarove ukoliko opce zna i sta je to. Ono sta je on napisao, je mozda drugi mod ili pa laze..
Aequam memento rebus in arduis servare mentem.

druga je stvar da li on laze ili ne..ali nemoj tako napadati ljude -_-"

radim svoj mod od 0 i ako nesto neznam pogledam kako je to u GF, da sam htio mogao sam uzeti neki gf ali ja hocu raditi svoj gm i nekuzim sta je tu cudno.ako znate odgovor molim da kazete hvala

a gle,ako gledas kako je to u GF i ako neces koristiti pvarove,zcmd(ili bar dcmd) i ostalo,cemu onda  da radis mod od 0?
ako ces raditi po GF uzmi najobicniji needitirani GF i kreni ga editovat..
cisto "prijateljski" savjet..
Poslednja Izmena: Oktobar 05, 2010, 19:09:33 POSLE PODNE od [Utopia]Rascal

ako koristim zcmd onda nemogu koristit strcmp, jel se to moze kako sredit?