/carupgrade

Započeo Hammer!, Jun 28, 2011, 19:26:58 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo ako netkome treba

if (strcmp(cmd, "/carupgrade", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new house = PlayerInfo[playerid][pPhousekey];
			GetPlayerName(playerid, playername, sizeof(playername));
			if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
			{
				new gunid[16];
                tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					format(string, sizeof(string), "Koristi: /carupgrade [carname]");
					SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
					SendClientMessage(playerid, COLOR_WHITE,"*** CAR UPGRADES Cost $5000 ***");
					SendClientMessage(playerid, COLOR_GRAD2,string);
					if(PlayerInfo[playerid][pLevel] >= 1)
					{
						SendClientMessage(playerid, COLOR_GRAD3, "Vozila: blistacompact,clover,elegant,emperor,glendale,greenwood");
						SendClientMessage(playerid, COLOR_GRAD3, "Vozila: huntley,jester,landstalker,merit,nebula,sabre,stratum");
						SendClientMessage(playerid, COLOR_GRAD3, "Vozila: sunrise,tahoma,uranus");
						SendClientMessage(playerid, COLOR_GRAD3, "Vozila: manana,mesa,bike,bmx,elegy");
						SendClientMessage(playerid, COLOR_GRAD3, "Donatorska Vozila: stretch phoenix hotknife bandito sultan");
					}
					SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
					return 1;
				}
				if(SBizzInfo[5][sbProducts] == 0)
				{
					GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
					return 1;
				}
				strmid(gunid, tmp, 0, strlen(cmdtext), 255);
				if (GetPlayerMoney(playerid) > 5000)
				{
					if(strcmp(gunid, "stretch", true, strlen(gunid)) == 0)
					{
					    if(PlayerInfo[playerid][pDonateRank] < 1)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Nemas Premium akaunt !");
					        return 1;
					    }
						SendClientMessage(playerid, COLOR_GRAD6, "Novi Upgrade: Tvoj novi kucni auto je Stretch");
						HouseInfo[house][hVec] = 409;
					}
					else if(strcmp(gunid, "hotknife", true, strlen(gunid)) == 0)
					{
					    if(PlayerInfo[playerid][pDonateRank] < 1)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Nemas Premium akaunt !");
					        return 1;
					    }
						SendClientMessage(playerid, COLOR_GRAD6, "Novi upgrade: Tvoj novi kucni auto je Hotknife");
						HouseInfo[house][hVec] = 434;
					}
					else if(strcmp(gunid, "bandito", true, strlen(gunid)) == 0)
					{
					    if(PlayerInfo[playerid][pDonateRank] < 1)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Nemas Premium akaunt !");
					        return 1;
					    }
						SendClientMessage(playerid, COLOR_GRAD6, "Novi upgrade: Tvoj novi kucni auto je Bandito");
						HouseInfo[house][hVec] = 568;
					}
					else if(strcmp(gunid, "sultan", true, strlen(gunid)) == 0)
					{
					    if(PlayerInfo[playerid][pDonateRank] < 1)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Nemas Premium akaunt !");
					        return 1;
					    }
						SendClientMessage(playerid, COLOR_GRAD6, "Novi upgrade: Tvoj novi kucni auto je Sultan");
						HouseInfo[house][hVec] = 560;
					}
					else if(strcmp(gunid, "elegy", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Elegy");
						HouseInfo[house][hVec] = 562;
					}
					else if(strcmp(gunid, "phoenix", true, strlen(gunid)) == 0)
					{
					    if(PlayerInfo[playerid][pDonateRank] < 1)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Nemas Premium akaunt !");
					        return 1;
					    }
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Phoenix");
						HouseInfo[house][hVec] = 603;
					}
					else if(strcmp(gunid, "blistacompact", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Blista Compact");
						HouseInfo[house][hVec] = 496;
					}
					else if(strcmp(gunid, "clover", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Clover");
						HouseInfo[house][hVec] = 542;
					}
					else if(strcmp(gunid, "elegant", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Elegant");
						HouseInfo[house][hVec] = 507;
					}
					else if(strcmp(gunid, "emperor", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Emperor");
						HouseInfo[house][hVec] = 585;
					}
					else if(strcmp(gunid, "glendale", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Glendale");
						HouseInfo[house][hVec] = 466;
					}
					else if(strcmp(gunid, "greenwood", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Greenwood");
						HouseInfo[house][hVec] = 492;
					}
					else if(strcmp(gunid, "huntley", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Huntley");
						HouseInfo[house][hVec] = 579;
					}
					else if(strcmp(gunid, "jester", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Jester");
						HouseInfo[house][hVec] = 559;
					}
					else if(strcmp(gunid, "landstalker", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Landstalker");
						HouseInfo[house][hVec] = 400;
					}
					else if(strcmp(gunid, "merit", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Merit");
						HouseInfo[house][hVec] = 551;
					}
					else if(strcmp(gunid, "nebula", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Nebula");
						HouseInfo[house][hVec] = 516;
					}
					else if(strcmp(gunid, "sabre", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Sabre");
						HouseInfo[house][hVec] = 475;
					}
					else if(strcmp(gunid, "Mesa", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi auto je sada Mesa");
						HouseInfo[house][hVec] = 500;
					}
					else if(strcmp(gunid, "bike", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je biciklo");
						HouseInfo[house][hVec] = 509;
					}
					else if(strcmp(gunid, "manana", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Manana");
						HouseInfo[house][hVec] = 410;
					}
					else if(strcmp(gunid, "bmx", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi auto je BMX");
						HouseInfo[house][hVec] = 481;
					}
					else if(strcmp(gunid, "stratum", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Stratum");
						HouseInfo[house][hVec] = 561;
					}
					else if(strcmp(gunid, "sunrise", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Sunrise");
						HouseInfo[house][hVec] = 550;
					}
					else if(strcmp(gunid, "tahoma", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Tahoma");
						HouseInfo[house][hVec] = 566;
					}
					else if(strcmp(gunid, "uranus", true, strlen(gunid)) == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Tvoj novi kucni auto je Uranus");
						HouseInfo[house][hVec] = 558;
					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD6, "   Nepostojece vozilo ili nedovoljan donator rank.");
						return 1;
					}
					SendClientMessage(playerid, COLOR_GRAD6, "Tvoj novi auto ce biti dostavljen za 24 sata -$5000");
					OnPropUpdate();
					GivePlayerMoney(playerid,-5000);
					SBizzInfo[5][sbTill] += 5000;
					ExtortionSBiz(5, 5000);
					SBizzInfo[5][sbProducts]--;
					PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Nemate ($5000)");
					return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   Nemas kucu mrs bre");
				return 1;
			}
		}
		return 1;
	}