pomoc

Započeo [Bp]jovan, Oktobar 25, 2010, 20:35:59 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

E ovako imam server pa neznam kako da oznacim naprime de staje autobus da pise BUS kao kod puta teo bi da tako napisme kako da neko kupi nesto i TD pa ako zna neko da mi objasni to da i ako me neko razume

------------------------------------------------------------------------------
Zahvaljujem Se Snich_Wolf-u Zato sto Mi je mnogo Pomogo oko Skriptanja...Snich Hvala brt <3 xD

makelele

pa i to uzmes snimis kordinate i napravis komandu buy na tom mjestu ako na to mislis,i komandu buy ako trebas imas je na svakom coskku!!!

Citat: fixman! poslato Oktobar 25, 2010, 21:10:45 POSLE PODNE
pa i to uzmes snimis kordinate i napravis komandu buy na tom mjestu ako na to mislis,i komandu buy ako trebas imas je na svakom coskku!!!

Molim te ti cuti vise....  -,-'   Ako ces vec da mu pomognes, lepo mu objasni a ne snimis kordinate i napravis komandu....Da zna da napravi komandu znao bi i da treba da snimi kordinate..
â"Œâˆ©â"(â—•_â—•)â"Œâˆ©â"

Respect to: (à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") , [Saw]BloodMaster

â"Œâˆ©â"(â—£_â—¢)â"Œâˆ©â"

makelele

ajd dobro eto ako si ti pametan ti mu sve lijepo objasni!!!
EDIT:evo ti od mene citava komanda e sad valjda ces znaci promjeniti sebi kordinate i sve sta hoces. I jos nesto izvadio sam iz moda da neki nepricaju kasnije nisi sam napisao bla bla bla....


if(strcmp(cmd, "/buy", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (!PlayerToPoint(100, playerid,663.836242,-575.605407,16.343263))//centerpoint 24-7
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   Niste u TRGOVINI !");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "KORISTITE: /buy [broj]");
				SendClientMessage(playerid, COLOR_GREEN, "|_______ KONZUM _______|");
				SendClientMessage(playerid, COLOR_GRAD1, "| 1: Mobitel $300			 2: Srecka $20");
				SendClientMessage(playerid, COLOR_GRAD2, "| 3: Tel. Imenik $10		 4: Dice $50");
				SendClientMessage(playerid, COLOR_GRAD3, "| 5: Auto kljuc $50		 6: Brava za auto $10");
				SendClientMessage(playerid, COLOR_GRAD4, "| 7: Brzinometar $100		 8: Prezervativ $5");
				SendClientMessage(playerid, COLOR_GRAD5, "| 9: CD-Player $250		 10: Piletina $10	");
    SendClientMessage(playerid, COLOR_GRAD5, "| 11: Hamburger $10		 12: Smrznuta pizza $10");
				SendClientMessage(playerid, COLOR_GRAD5, "| 13: LapTop $500          14: Cigarete $30");
				SendClientMessage(playerid, COLOR_GRAD5, "| 15: Upaljac $2           16: Otrovne tablete $50");
				SendClientMessage(playerid, COLOR_GRAD5, "| 17: Mobilni bon $50      18: Mobilni bon $100");
				return 1;
			}
				new item = strval(tmp);
			
		
			if (item == 1 && GetPlayerMoney(playerid) > 300)
			{
			    if(PlayerInfo[playerid][pTraderPerk] > 0)
			    {
					new skill = 500 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 500 - price;
			        format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
					GivePlayerMoney(playerid,- payout);
					
			    }
			    else
			    {
			        format(string, sizeof(string), "~r~-$%d", 1000);
					GameTextForPlayer(playerid, string, 5000, 1);
					GivePlayerMoney(playerid,-300);
					
			    }
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				new randphone = 1000 + random(8999);//minimum 1000  max 9999
				PlayerInfo[playerid][pPnumber] = randphone;
				format(string, sizeof(string), "   Mobitel kupljen i vas novi broj je %d", randphone);
				SendClientMessage(playerid, COLOR_GRAD4, string);
				SendClientMessage(playerid, COLOR_GRAD5, "Mozete ga viditi bilo kada koristeci /stats");
				SendClientMessage(playerid, COLOR_WHITE, "HINT: Sada mozete upisati /help da vidite mobilne komande.");
				return 1;
			}
			else if (item == 2 && GetPlayerMoney(playerid) > 20)
			{
			    if(PlayerInfo[playerid][pTraderPerk] > 0)
			    {
					new skill = 7500 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 7500 - price;
					GivePlayerMoney(playerid,- 300);
					
					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				    GivePlayerMoney(playerid,-20);
					
					format(string, sizeof(string), "~r~-$%d", 1000);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				new prize;
				new symb1[32]; new symb2[32]; new symb3[32];
				new randcard1 = random(10);//minimum 1000  max 9999
				new randcard2 = random(10);//minimum 1000  max 9999
				new randcard3 = random(10);//minimum 1000  max 9999
				if(randcard1 >= 5)
				{
					format(symb1, sizeof(symb1), "~b~]");
					randcard1 = 1;
				}
				else if(randcard1 <= 4 && randcard1 >= 2)
				{
					format(symb1, sizeof(symb1), "~g~]");
					randcard1 = 2;
				}
				else if(randcard1 < 2)
				{
					format(symb1, sizeof(symb1), "~y~]");
					randcard1 = 3;
				}
				if(randcard2 >= 5)
				{
					format(symb2, sizeof(symb2), "~b~]");
					randcard2 = 1;
				}
				else if(randcard2 <= 4 && randcard2 >= 2)
				{
					format(symb2, sizeof(symb2), "~g~]");
					randcard2 = 2;
				}
				else if(randcard2 < 2)
				{
					format(symb2, sizeof(symb2), "~y~]");
					randcard2 = 3;
				}
				if(randcard3 >= 5)
				{
					format(symb3, sizeof(symb3), "~b~]");
					randcard3 = 1;
				}
				else if(randcard3 <= 4 && randcard3 >= 2)
				{
					format(symb3, sizeof(symb3), "~g~]");
					randcard3 = 2;
				}
				else if(randcard3 < 2)
				{
					format(symb3, sizeof(symb3), "~y~]");
					randcard3 = 3;
				}
				if(randcard1 == randcard2 && randcard1 == randcard3)
				{
					if(randcard1 > 5)
					{
						prize = 2500;
					}
					if(randcard1 <= 4 && randcard1 >= 2)
					{
						prize = 1500;
					}
					if(randcard1 < 2)
					{
						prize = 500;
					}
					GivePlayerMoney(playerid,40);
					
					format(string, sizeof(string), "%s %s %s ~n~~n~~w~~g~$%d",symb1,symb2,symb3, prize);
				}
				else
				{
					format(string, sizeof(string), "%s %s %s ~n~~n~~w~~r~$0",symb1,symb2,symb3);
				}
				GameTextForPlayer(playerid, string, 3000, 3);
				return 1;
			}
			else if (item == 3 && GetPlayerMoney(playerid) > 10)
			{
			    if(PlayerInfo[playerid][pTraderPerk] > 0)
			    {
					new skill = 5000 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 5000 - price;
					GivePlayerMoney(playerid,- 300);
					
					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				    GivePlayerMoney(playerid,-10);
				
					format(string, sizeof(string), "~r~-$%d", 5000);
					GameTextForPlayer(playerid, string, 50, 1);
				}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                PlayerInfo[playerid][pPhoneBook] = 1;
				format(string, sizeof(string), "   Telefonski imenik kupljen i sada mozete viditi broj od bilo kojeg igraca !");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				SendClientMessage(playerid, COLOR_WHITE, "HINT: Koristite /number <id/ime>.");
				return 1;
			}
			else if (item == 4 && GetPlayerMoney(playerid) > 50)
			{
			    if(PlayerInfo[playerid][pTraderPerk] > 0)
			    {
					new skill = 500 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 500 - price;
					GivePlayerMoney(playerid,- 20);
					
					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				    GivePlayerMoney(playerid,-50);
					
					format(string, sizeof(string), "~r~-$%d", 500);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				gDice[playerid] = 1;
				format(string, sizeof(string), "   Dice kupljan i sada mozete isprobati Dice.");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				SendClientMessage(playerid, COLOR_WHITE, "HINT: Koristite /dice ");
				return 1;
			}
			else if(item == 5 && GetPlayerMoney(playerid) > 50)
			{
				if (gLastCar[playerid] != 0)
				{
					if(HireCar[playerid] != 299)
					{
						gCarLock[HireCar[playerid]] = 0;
						UnLockCar(HireCar[playerid]);
						HireCar[playerid] = 299;
					}
					if(PlayerInfo[playerid][pTraderPerk] > 0)
			    	{
						new skill = 5000 / 100;
						new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
						new payout = 5000 - price;
						GivePlayerMoney(playerid,- 50);
						
						format(string, sizeof(string), "~r~-$%d", payout);
						GameTextForPlayer(playerid, string, 5000, 1);
					}
					else
					{
					    GivePlayerMoney(playerid,-50);
						
						format(string, sizeof(string), "~r~-$%d", 5000);
						GameTextForPlayer(playerid, string, 5000, 1);
					}
					
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					HireCar[playerid] = gLastCar[playerid];
					format(string, sizeof(string), "Kljuc kupljen i sada mozete zakljucati vas  auto.");
					SendClientMessage(playerid, COLOR_GRAD4, string);
					SendClientMessage(playerid, COLOR_WHITE, "HINT: Koristite /lock ");
				}
				else
				{
					SendClientMessage(playerid, COLOR_WHITE, "   Nemate vozilo !");
				}
				return 1;
			}
			else if (item == 6 && GetPlayerMoney(playerid) > 50)
			{
				if(PlayerInfo[playerid][pPhousekey] != 255)
				{
					for(new i = 0; i < MAX_PLAYERS; i++)
					{
						if(IsPlayerConnected(i) == 1 && HireCar[PlayerInfo[playerid][pPhousekey]+1])
						{
							HireCar[i] = 299;
						}
					}
					if(PlayerInfo[playerid][pTraderPerk] > 0)
			    	{
						new skill = 10000 / 100;
						new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
						new payout = 10000 - price;
						GivePlayerMoney(playerid,- 50);
						
						format(string, sizeof(string), "~r~-$%d", payout);
						GameTextForPlayer(playerid, string, 5000, 1);
					}
					else
					{
					    GivePlayerMoney(playerid,-50);
						
						format(string, sizeof(string), "~r~-$%d", 10000);
						GameTextForPlayer(playerid, string, 5000, 1);
					}
				
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					format(string, sizeof(string), "Novi Kljuc kupljen.");
					SendClientMessage(playerid, COLOR_GRAD4, string);
					SendClientMessage(playerid, COLOR_WHITE, "HINT: Koristite /lock ");
				}
				else
				{
					SendClientMessage(playerid, COLOR_WHITE, "   Nemate vozilo !");
				}
				return 1;
			}
			else if (item == 7 && GetPlayerMoney(playerid) > 100)
			{
				gSpeedo[playerid] = 1;
				if(PlayerInfo[playerid][pTraderPerk] > 0)
		    	{
					new skill = 5000 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 5000 - price;
					GivePlayerMoney(playerid,- 100);

					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				    GivePlayerMoney(playerid,-100);
					
					format(string, sizeof(string), "~r~-$%d", 5000);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
			
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "Brzinometar kupljen.");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				SendClientMessage(playerid, COLOR_WHITE, "HINT: Koristite /speedo ");
				return 1;
			}
			else if (item == 8 && GetPlayerMoney(playerid) > 5)
			{
			    if(PlayerInfo[playerid][pTraderPerk] > 0)
		    	{
					new skill = 50 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 50 - price;
					GivePlayerMoney(playerid,- payout);
					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				    GivePlayerMoney(playerid,-5);
					format(string, sizeof(string), "~r~-$%d", 50);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				Condom[playerid] ++;
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "Prezervativ kupljen.");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				return 1;
			}
			else if (item == 9 && GetPlayerMoney(playerid) > 250)
			{
			    if(PlayerInfo[playerid][pTraderPerk] > 0)
		    	{
					new skill = 2500 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 2500 - price;
					GivePlayerMoney(playerid, - payout);
					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				    GivePlayerMoney(playerid, - 250);
					format(string, sizeof(string), "~r~-$%d", 2500);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "CD-Player kupljen.");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				SendClientMessage(playerid, COLOR_WHITE, "HINT: Koristite /music");
				PlayerInfo[playerid][pCDPlayer] = 1;
				return 1;
			}
			
			else if (item == 13 && GetPlayerMoney(playerid) > 500)
			{
			    if(PlayerInfo[playerid][pLapTop] >= 1)
			    {
			        SendClientMessage(playerid, COLOR_GREY, "   Vec imate Lap Top !");
			        return 1;
			    }
			    if(PlayerInfo[playerid][pTraderPerk] > 0)
		    	{
					new skill = 10 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 10 - price;
					GivePlayerMoney(playerid, - payout);
					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				    GivePlayerMoney(playerid, - 500);
					format(string, sizeof(string), "~r~-$%d", 10);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "Lap Top kupljen.");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				PlayerInfo[giveplayerid][pLapTop] = 1;
				return 1;
			}
			else if (item == 14 && GetPlayerMoney(playerid) > 30)
			{
			    if(PlayerInfo[playerid][pCigare] != 0)
			    {
			        format(string, sizeof(string), "   Vec imate preostalih %d cigareta.", PlayerInfo[playerid][pCigare]);
			        SendClientMessage(playerid, COLOR_GREY, string);
			        return 1;
			    }
			    GivePlayerMoney(playerid, - 30);
			    PlayerInfo[playerid][pCigare] = 20;
			    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			    format(string, sizeof(string), "~r~-$%d", 30);
			    GameTextForPlayer(playerid, string, 5000, 1);
			    SendClientMessage(playerid, COLOR_GRAD4, "Cigarete kupljene.");
			    SendClientMessage(playerid, COLOR_WHITE, "HINT: Sada mozete pusiti cigarete sa /smoke !");
			    PlayerUpdate(playerid);
			}
			else if (item == 15 && GetPlayerMoney(playerid) > 2)
			{
			    if(PlayerInfo[playerid][pLighter] != 0)
			    {
			        SendClientMessage(playerid, COLOR_GREY, "   Vec imate upaljac ! ");
			        return 1;
			    }
			    GivePlayerMoney(playerid, - 2);
			    PlayerInfo[playerid][pLighter] = 30;
			    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			    format(string, sizeof(string), "~r~-$%d", 5);
			    GameTextForPlayer(playerid, string, 5000, 1);
			    SendClientMessage(playerid, COLOR_GRAD4, "Upaljac kupljen.");
			    PlayerUpdate(playerid);
			    return 1;
			}
			else if (item == 16 && GetPlayerMoney(playerid) > 50)
			{
			    if(PlayerInfo[playerid][pTablete] != 0)
			    {
			        format(string, sizeof(string), "   Vec imate preostalih %d tableta.", PlayerInfo[playerid][pTablete]);
			        SendClientMessage(playerid, COLOR_GREY, string);
			        return 1;
			    }
			    GivePlayerMoney(playerid, - 50);
			    PlayerInfo[playerid][pTablete] = 12;
			    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			    format(string, sizeof(string), "~r~-$%d", 30);
			    GameTextForPlayer(playerid, string, 5000, 1);
			    SendClientMessage(playerid, COLOR_GRAD4, "Otrovne tablete kupljene.");
			    SendClientMessage(playerid, COLOR_WHITE, "HINT: Sada se mozete ubiti sa komandom /kill !");
			    PlayerUpdate(playerid);
			}
			else if (item == 17 && GetPlayerMoney(playerid) > 50)
			{
			    if(PlayerInfo[playerid][pMobileBon] != 0)
			    {
			        format(string, sizeof(string), "   Vec imate preostalih %d$ na racunu.", PlayerInfo[playerid][pMobileBon]);
			        SendClientMessage(playerid, COLOR_GREY, string);
			        return 1;
			    }
			    GivePlayerMoney(playerid, - 50);
			    PlayerInfo[playerid][pMobileBon] = 50;
			    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			    format(string, sizeof(string), "~r~-$%d", 30);
			    GameTextForPlayer(playerid, string, 5000, 1);
			    SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste bon od $50.");
			    PlayerUpdate(playerid);
			}
			else if (item == 18 && GetPlayerMoney(playerid) > 100)
			{
			    if(PlayerInfo[playerid][pMobileBon] != 0)
			    {
			        format(string, sizeof(string), "   Vec imate preostalih %d$ na racunu.", PlayerInfo[playerid][pMobileBon]);
			        SendClientMessage(playerid, COLOR_GREY, string);
			        return 1;
			    }
			    GivePlayerMoney(playerid, - 50);
			    PlayerInfo[playerid][pMobileBon] = 100;
			    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			    format(string, sizeof(string), "~r~-$%d", 30);
			    GameTextForPlayer(playerid, string, 5000, 1);
			    SendClientMessage(playerid, COLOR_GRAD4, "Kupili ste bon od $100.");
			    PlayerUpdate(playerid);
			}
			else
			{
				SendClientMessage(playerid, COLOR_WHITE, "   Nemate kucu za to !");
			}
		}
		return 1;
	}
Poslednja Izmena: Oktobar 25, 2010, 21:32:14 POSLE PODNE od fixman!