[pomoc]forward

Započeo ‹Fox›, Oktobar 01, 2010, 13:32:13 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ja kad napisem forward ime(playerid); ili tak nesta i onda napravim public ime(playerid); i uvijek mi se pokaze 1 vise warning znam da warninzi neutjecu previse na rad servera i da warninzi bas i nisu vazni ali ipak radim rp mode od 0 i morat cu imat puno forwarda novih a uvjek je +1warning pa ako se moze nekak rijesit ti warninzi


i imam jos jedno pitanje pa da ne otvaram novu temu evo sad cu pitat:
radim vjecnicu i kad odem na wikisamp trazit interior id tamo pise da je vjecnica id 3 ali ima jos interiora sa id 3 i koji je onda bas pravi id vjecnice? i kak da u vjecnici dodam pickup nemogu pickapu namjestit interior
Poslednja Izmena: Oktobar 01, 2010, 13:36:17 POSLE PODNE od \\!~!//DeFox\\!~!//

Citat: \\!~!//DeFox\\!~!// poslato Oktobar 01, 2010, 13:32:13 POSLE PODNE
ja kad napisem forward ime(playerid); ili tak nesta i onda napravim public ime(playerid); i uvijek mi se pokaze 1 vise warning znam da warninzi neutjecu previse na rad servera i da warninzi bas i nisu vazni ali ipak radim rp mode od 0 i morat cu imat puno forwarda novih a uvjek je +1warning pa ako se moze nekak rijesit ti warninzi


i imam jos jedno pitanje pa da ne otvaram novu temu evo sad cu pitat:
radim vjecnicu i kad odem na wikisamp trazit interior id tamo pise da je vjecnica id 3 ali ima jos interiora sa id 3 i koji je onda bas pravi id vjecnice? i kak da u vjecnici dodam pickup nemogu pickapu namjestit interior


Koji warning ?
BTW kod "public" ti nema ";" A ovo za interior kod vjecnice ti je id 3 mislim al ako znas stavljat intove onda valjda znas da su ti potrebne koordinate tog inta ...
Vikend je policija nas hvata,
vikend je ode cijela plata,
oko nas stvari ukradene,
sve smo dali na planove i sheme..
||||:=:=:=:=:=:=::=:=:=:=:=:=:=:THE IVEX:=:=:=:=:=:=:=:=:=::=:=:=:=:=:=::=:|||| 


PS: Ne saljite mi nikakve pm jer neodgovaram na njih! Ako trebate nes pitajte ove pr0 skriptere pa neka vam kazu!Hvala !

ovaj warning:
C:\Documents and Settings\Slavko\Desktop\server na 0.3b\gamemodes\multirp.pwn(1061) : warning 235: public function lacks forward declaration (symbol "PayDay")
______________________________________________________________________
ovo za public to znam da nejde ";" to samo se malo zezno kad sam pisao
_________________________________________________________________
neznam stavljat intove mozes mi to malo pojasnit ili mi dati neki tut ak ti nije problem

Neznas stavljat intove? - ostavi se skriptanja rp gm-od 0....

SetPlayerInterior(playerid, interior id);
SetPlayerPos(playerid,X, Y, Z); 

ovdje ti ide xyz vjecnice...

za ono prvo:
forward ime(OvdjeNekeFunkcije);

pod neke funkcije stavis npr playerid itd...

ok ja sam prije stavio samo SetPlayerPos(playerid, x,y,z);  a nisam setplayerinterior sad je sve ok

samo jos jedno pitanje:
napravio sam komandu ulaz i stavio sam isplayerinrangeofpoint x,y,z ispred vjecnice i kad ukuca ulaz stavi ga u vjecnicu ali pise Server unknow command a sve mu napravi
evo komande:
CMD:ulaz(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 1480.9727,-1771.3177,18.7958))
return 1;
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
}
return 1;
}
Poslednja Izmena: Oktobar 01, 2010, 15:05:49 POSLE PODNE od \\!~!//DeFox\\!~!//

ok hvala ali imam jos jedno pitanje xD imam problem sa register dialogom i sad ocu da kad mora izabrat spol da moze u onaj dialog za pisanje upisat samo musko ili zensko i da mu namjesti spol musko ako je upisao musko znaci nemoze upisat "nuiadhuiaf" nego samo musko ili zensko
eto kakav ima sada dialog
Kod: c
if(dialogid == ReGiStEr)
	{
		if(response)
		{
			GivePlayerMoney(playerid, 2200);
		    new file[128];
		    new string[128];
		    new name[MAX_PLAYER_NAME];
			GetPlayerName(playerid, name, sizeof(name));
			if(strlen(inputtext) == 0)
			{
				format(string, sizeof string, "Upisite lozinku!\n Tvoj account nije registriran! Molimo da se registrirate", name);
				ShowPlayerDialog(playerid, ReGiStEr, DIALOG_STYLE_INPUT, "Registracija", string, "Register!", "Odustani.");
				return 0;
			}
			format(file,sizeof(file),"%s.ini",name);
			if(!fexist(file))
			{
				dini_Create(file);
				dini_IntSet(file,"Password", udb_hash(inputtext));
				dini_IntSet(file,"Score", GetPlayerScore(playerid));
				dini_IntSet(file,"Deaths", PlayerInfo[playerid][pDeaths]);
			    dini_IntSet(file,"Kills", PlayerInfo[playerid][pKills]);
			    dini_IntSet(file,"AdminLevel", PlayerInfo[playerid][pAdmin]);
			    dini_IntSet(file,"ServerTime", PlayerInfo[playerid][ServerTime]);
				PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
				GetPlayerName(playerid, name, sizeof(name));
				ShowPlayerDialog(playerid, spol, DIALOG_STYLE_LIST, "Izaberite spol:", "Musko\nZensko", "Izaberi", "Odustani.");
			}
		}
	}

nekuzis, ja sam sad napravio da za musko ili zensko mora upisati u dialog_style_input ali kako da napravim da ako on upise musko da mu stavi spol za musko a ako upise nesta bezveze npr. "njkfbhjak" da mu nista ne stavi znaci on moze napisati samo musko ili zensko a nezz kak da to napravim

evo sredio sam sve samo imam jos jedan problem sa jednim znakom na tipkovnicom kak napravit crticu ali ne ovu "-" nego prema gore onu kao I samo je I slovo a meni treba znak crtica prema gore ako moze ko pomoc

Zavisi kakva ti je tastatura :DD


|||||||||||||||||||||||||||||   .... Evo ti pa kopiraj sebi ako si na to mislio :D

jesam na to sam mislio xD aj reci koje si tipke stiskao za to

stisnio je desni alt i w |
Mario_Balukcic

ok hvala, imam jos jedan jakooooooooooooooooooooo veliki problem sa /stats i /buylevel, kada udjem u igru i upisem /buylevel kaze mi da mi teba 0 respecta i da trenutno imam 1 evo vam stats i buylevel i pls pomoczite mi
Kod: c
if (strcmp(cmdtext, "/stats", true) == 0)
	{
	new string[128];
	new sendername[24];
		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 = "Bosna"; }
		else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Srbija"; }
		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[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Policajac"; }
		else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
		else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "Vojnik"; }
		else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Lijecnik"; }
		else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
		else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Yakuza"; }
		else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
		else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "Reporter"; }
		else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxist"; }
		else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "Instruktor"; }
		new dtext[20];
		if(STDPlayer[targetid] == 1) { dtext = "Hepatitis"; }
		else if(STDPlayer[targetid] == 2) { dtext = "Sida"; }
		else if(STDPlayer[targetid] == 3) { dtext = "Sifilis"; }
		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 = "Yakuza"; }
		else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
		{ ftext = "License Faction"; }
		else
		{ ftext = "None"; }
		new f2text[20];
	    if(PlayerInfo[targetid][pFMember] < 255) {FamilyInfo[PlayerInfo[targetid][pFMember]]; }
		else {f2text = "None"; }
	    new rtext[64];
	    if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
	    {
        	if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Soldier"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
  			else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Godfather"; }
			else { rtext = "Outsider"; }
		}
		else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Cadet"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Officer"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Sergeant"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lieutenant"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Captain"; }
	        else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Chief"; }
			else { rtext = "Cadet"; }
		}
		else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Professional Staff"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Special Agent Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Special Agent"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent in Charge"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Assistant Director in Charge"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
			else { rtext = "Intern"; }
		}
		else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Private"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Sergeant"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Captain"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
			else { rtext = "Private"; }
		}
		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 = "Intern"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Local Reporter"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Local Editor"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Network Anchor"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Network Editor"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
			else { rtext = "Intern"; }
		}
		else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi Rookie"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cabbie"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Dispatcher"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Shift Supervisor"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Company Owner"; }
			else { rtext = "Trainee"; }
		}
		else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
			else { rtext = "Trainee"; }
		}
		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 Jacker"; }
        else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
        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 = "Bus Driver"; }
        else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
        else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
        else { jtext = "None"; }
		new drank[20];
		if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Pocasni Clan"; }
		else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Donator"; }
		else { drank = "None"; }
		new married[20];
		strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
		new age = PlayerInfo[targetid][pAge];
		new deaths = PlayerInfo[targetid][pDeaths];
		new arrests = PlayerInfo[targetid][pArrested];
		new drugs = PlayerInfo[targetid][pDrugs];
		new mats = PlayerInfo[targetid][pMats];
		new level = PlayerInfo[playerid][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 housekey = PlayerInfo[targetid][pPhousekey];
		new bizkey = PlayerInfo[targetid][pPbiskey];
		new intir = PlayerInfo[targetid][pInt];
		new local = PlayerInfo[targetid][pLocal];
		new Float:health;
		new name[24];
		GetPlayerName(targetid, 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, cash, account, pnumber);
		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[targetid],intir,local);
			SendClientMessage(playerid, COLOR_GRAD6,coordsstring5);
		}
		SendClientMessage(playerid, COLOR_GREEN,"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°");
		return 1;
	}



	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 novca. ($%d)",costlevel);
						SendClientMessage(playerid, COLOR_LIME, infostring);
						return 1;
					}
					else if (PlayerInfo[playerid][pExp] >= 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][pLevel]++;
						if(PlayerInfo[playerid][pDonateRank] > 0)
						{
						    PlayerInfo[playerid][pExp] = expamount;
						    new total = PlayerInfo[playerid][pExp];
						    if(total > 0)
						    {
						        PlayerInfo[playerid][pExp] = total;
						    }
						    else
						    {
						        PlayerInfo[playerid][pExp] = 0;
						    }
						}
						else
						{
							PlayerInfo[playerid][pExp] = 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);
					}
				}
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "   Nisi logiran !");
			}
		}
		return 1;
	}

Citat: \\!~!//DeFox\\!~!// poslato Oktobar 02, 2010, 16:03:09 POSLE PODNE
ok hvala, imam jos jedan jakooooooooooooooooooooo veliki problem sa /stats i /buylevel, kada udjem u igru i upisem /buylevel kaze mi da mi teba 0 respecta i da trenutno imam 1 evo vam stats i buylevel i pls pomoczite mi
Kod: c
if (strcmp(cmdtext, "/stats", true) == 0)
	{
	new string[128];
	new sendername[24];
		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 = "Bosna"; }
		else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Srbija"; }
		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[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Policajac"; }
		else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
		else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "Vojnik"; }
		else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Lijecnik"; }
		else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
		else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Yakuza"; }
		else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
		else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "Reporter"; }
		else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxist"; }
		else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "Instruktor"; }
		new dtext[20];
		if(STDPlayer[targetid] == 1) { dtext = "Hepatitis"; }
		else if(STDPlayer[targetid] == 2) { dtext = "Sida"; }
		else if(STDPlayer[targetid] == 3) { dtext = "Sifilis"; }
		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 = "Yakuza"; }
		else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
		{ ftext = "License Faction"; }
		else
		{ ftext = "None"; }
		new f2text[20];
	    if(PlayerInfo[targetid][pFMember] < 255) {FamilyInfo[PlayerInfo[targetid][pFMember]]; }
		else {f2text = "None"; }
	    new rtext[64];
	    if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
	    {
        	if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Soldier"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
  			else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Godfather"; }
			else { rtext = "Outsider"; }
		}
		else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Cadet"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Officer"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Sergeant"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lieutenant"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Captain"; }
	        else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Chief"; }
			else { rtext = "Cadet"; }
		}
		else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Professional Staff"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Special Agent Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Special Agent"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent in Charge"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Assistant Director in Charge"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
			else { rtext = "Intern"; }
		}
		else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Private"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Sergeant"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Captain"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
			else { rtext = "Private"; }
		}
		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 = "Intern"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Local Reporter"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Local Editor"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Network Anchor"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Network Editor"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
			else { rtext = "Intern"; }
		}
		else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi Rookie"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cabbie"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Dispatcher"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Shift Supervisor"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Company Owner"; }
			else { rtext = "Trainee"; }
		}
		else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
			else { rtext = "Trainee"; }
		}
		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 Jacker"; }
        else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
        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 = "Bus Driver"; }
        else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
        else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
        else { jtext = "None"; }
		new drank[20];
		if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Pocasni Clan"; }
		else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Donator"; }
		else { drank = "None"; }
		new married[20];
		strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
		new age = PlayerInfo[targetid][pAge];
		new deaths = PlayerInfo[targetid][pDeaths];
		new arrests = PlayerInfo[targetid][pArrested];
		new drugs = PlayerInfo[targetid][pDrugs];
		new mats = PlayerInfo[targetid][pMats];
		new level = PlayerInfo[playerid][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 housekey = PlayerInfo[targetid][pPhousekey];
		new bizkey = PlayerInfo[targetid][pPbiskey];
		new intir = PlayerInfo[targetid][pInt];
		new local = PlayerInfo[targetid][pLocal];
		new Float:health;
		new name[24];
		GetPlayerName(targetid, 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, cash, account, pnumber);
		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[targetid],intir,local);
			SendClientMessage(playerid, COLOR_GRAD6,coordsstring5);
		}
		SendClientMessage(playerid, COLOR_GREEN,"°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°");
		return 1;
	}



	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 novca. ($%d)",costlevel);
						SendClientMessage(playerid, COLOR_LIME, infostring);
						return 1;
					}
					else if (PlayerInfo[playerid][pExp] >= 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][pLevel]++;
						if(PlayerInfo[playerid][pDonateRank] > 0)
						{
						    PlayerInfo[playerid][pExp] = expamount;
						    new total = PlayerInfo[playerid][pExp];
						    if(total > 0)
						    {
						        PlayerInfo[playerid][pExp] = total;
						    }
						    else
						    {
						        PlayerInfo[playerid][pExp] = 0;
						    }
						}
						else
						{
							PlayerInfo[playerid][pExp] = 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);
					}
				}
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "   Nisi logiran !");
			}
		}
		return 1;
	}

to je GF ne gm od 0 -.-

ma ja radim svoj gm od 0 ali ipak neke stvari nemogu sam pa kopiram iz gamemodea "Croatian-Mafia Roleplay" xD nemogu ja sve sam