Probleme cu gamemode-ul "The Godfather", si altele
#11

Uite comanda /hu este de la mn din gm nu am probleme dar mi se pare aceasi

Code:
if(strcmp(cmd, "/houseupgrade", true) == 0 || strcmp(cmd, "/hu", 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)
			{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /houseupgrade [item number]");
					SendClientMessage(playerid, COLOR_GRAD1, "|_______ Home Supplys _______|");
					SendClientMessage(playerid, COLOR_GRAD2, "| 1: Health Upgrade $50000");
					SendClientMessage(playerid, COLOR_GRAD3, "| 2: Armour Upgrade $100000");
					SendClientMessage(playerid, COLOR_GRAD5, "| 3: TV $500");
					return 1;
				}
				new item = strval(tmp);
				switch (item)
				{
					case 1:
					{
						if(SBizzInfo[6][sbProducts] == 0)
						{
							GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
							return 1;
						}
						if(PlayerInfo[playerid][pLevel] < 5)
						{
							SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 5 To Purchase This");
							return 1;
						}
						if(GetPlayerMoney(playerid) < 50000)
						{
							SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
							return 1;
						}
						HouseInfo[house][hHel] = 1;
						GivePlayerMoney(playerid,-50000);
						SBizzInfo[6][sbTill] += 50000;//heal buisness
						ExtortionSBiz(6, 50000);
						SBizzInfo[6][sbProducts]--;
						PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
						SendClientMessage(playerid, COLOR_GRAD5, "You Can Now Heal Yourself At Home, Type /heal.");
					}
					case 2:
					{
					    if(!IsACop(playerid))
					    {
							SendClientMessage(playerid, COLOR_GREY, "   You can't buy this, you are not a Cop !");
							return 1;
					    }
						if(SBizzInfo[6][sbProducts] == 0)
						{
							GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
							return 1;
						}
						if (PlayerInfo[playerid][pLevel] < 7)
						{
							SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 7 To Purchase This");
							return 1;
						}
						if(GetPlayerMoney(playerid) < 100000)
						{
							SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
							return 1;
						}
						HouseInfo[house][hArm] = 1;
						GivePlayerMoney(playerid,-100000);
						SBizzInfo[6][sbTill] += 100000;//heal buisness
						ExtortionSBiz(6, 100000);
						SBizzInfo[6][sbProducts]--;
						PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
						SendClientMessage(playerid, COLOR_GRAD5, "You Can Now Get Armour At Home, Type /heal.");
					}
					case 3:
					{
						if(SBizzInfo[6][sbProducts] == 0)
						{
							GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
							return 1;
						}
						if (PlayerInfo[playerid][pLevel] < 3)
						{
							SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 3 To Purchase This");
							return 1;
						}
						if(GetPlayerMoney(playerid) < 500)
						{
							SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
							return 1;
						}
						HouseInfo[house][hHealthx] = 1;
						GivePlayerMoney(playerid,-500);
						SBizzInfo[6][sbTill] += 500;
						ExtortionSBiz(6, 500);
						SBizzInfo[6][sbProducts]--;
						PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
						SendClientMessage(playerid, COLOR_GRAD5, "You can now use your TV set, type /tv.");
					}
				}
				OnPropUpdate();
				OnPlayerUpdate(playerid);
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   You don't own a house");
				return 1;
			}
		}
		return 1;
	}
si /heal

Code:
if(strcmp(cmd, "/heal", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new location = PlayerInfo[playerid][pLocal];
			if(!strlen(tmp))
			{
				if(location != 255)
				{
					if(location < 99)
					{
						if(HouseInfo[location][hArm] == 1 && IsACop(playerid))
						{
							format(string, sizeof(string), "* %s puts on body armour.", sendername);
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							TogglePlayerControllable(playerid, 0);
							GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
							Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
							Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
							SetPlayerPos(playerid,1527.5,-12.1,1002.0);
							PlayerInfo[playerid][pLocal] = 255;
							SetPlayerInterior(playerid,99);
							Spectate[playerid] = 257;
						}
						else
						{
							format(string, sizeof(string), "This place does not have armour upgrades.");
							SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
						}
						if(HouseInfo[location][hHel] == 1)
						{
							new Float:tempheal;
							GetPlayerHealth(playerid,tempheal);
							if ( tempheal < 100.0)
							{
								SetPlayerHealth(playerid,100.0);
								PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
								format(string, sizeof(string), "You have been healed to 100 health.");
								SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
							}
							else
							{
								SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
							}
						}
						else
						{
							format(string, sizeof(string), "This place does not have healing upgrades.");
							SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
						}
						return 1;
					}
					else if(location == 101)//Restaurant
					{
					    new Float:tempheal;
						GetPlayerHealth(playerid,tempheal);
						if ( tempheal < 100.0)
						{
							SetPlayerHealth(playerid,100.0);
							PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
							format(string, sizeof(string), "You have been healed to 100 health.");
							SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
						}
						else
						{
							SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
						}
					}
					else if(location == 102 && IsACop(playerid))//Police Armoury
					{
					    SetPlayerHealth(playerid,100.0);
					    format(string, sizeof(string), "* %s puts on body armour.", sendername);
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						TogglePlayerControllable(playerid, 0);
						GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
						Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
						Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
						SetPlayerPos(playerid,1527.5,-12.1,1002.0);
						PlayerInfo[playerid][pLocal] = 255;
						SetPlayerInterior(playerid,99);
						Spectate[playerid] = 257;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /heal [playerid/PartOfName] [price]");
					return 1;
				}
			}
			giveplayerid = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /heal [playerid/PartOfName] [price]");
				return 1;
			}
			moneys = strval(tmp);
			if(moneys < 1 || moneys > 1000) { SendClientMessage(playerid, COLOR_GREY, "   Healing price not below 1 or above 1000 !"); return 1; }
			if (giveplayerid == playerid)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   You can not heal yourself!");
				return 1;
			}
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					new giveambu = GetPlayerVehicleID(giveplayerid);
					new playambu = GetPlayerVehicleID(playerid);
					if(gTeam[playerid] == TEAM_CYAN||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)//model
					{
					if (IsAnAmbulance(playambu) && playambu == giveambu)
						{
							new Float:tempheal;
							GetPlayerHealth(giveplayerid,tempheal);
							if(tempheal >= 100.0)
							{
								SendClientMessage(playerid, TEAM_GREEN_COLOR,"   That person is fully healed.");
								return 1;
							}
							format(string, sizeof(string), "~y~You healed ~n~~w~%s~n~~g~$%d", giveplayer,moneys);
							GameTextForPlayer(playerid, string, 5000, 1);
							GivePlayerMoney(playerid,moneys);
							GivePlayerMoney(giveplayerid,-moneys);
							new hp = 0;
						    if(PlayerInfo[playerid][pPainPerk] > 0)
						    {
						        hp = 20 * PlayerInfo[playerid][pPainPerk]; hp += 100;
								SetPlayerHealth(giveplayerid, hp);
						    }
						    else
						    {
						        hp = 100;
						        SetPlayerHealth(giveplayerid, 100);
						    }
							PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
							PlayerPlaySound(giveplayerid, 1150, 0.0, 0.0, 0.0);
							format(string, sizeof(string), "You have been healed to %d health -$%d",hp,moneys);
							SendClientMessage(giveplayerid, TEAM_GREEN_COLOR,string);
							if(STDPlayer[giveplayerid] > 0)
				            {
								STDPlayer[giveplayerid] = 0;
								SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* You are no longer infected with a STD anymore because of the Medics help !");
							}
						}
						else
						{
							SendClientMessage(playerid, COLOR_GRAD1, "   One of you is not in the Ambulance / Chopper !");
							return 1;
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
						return 1;
					}
				}
			}
			else
			{
				format(string, sizeof(string), "That player is not connected.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Cum sa faci gates si cum sa adaugi masini la o factiune? - by chas13 - 23.04.2010, 17:24
[help]wanted - by Freakzz - 09.06.2010, 16:21
PROBLEMA LARP - by Pawno_Scripter - 14.06.2010, 14:17
Re: PROBLEMA LARP - by Pawno_Scripter - 15.06.2010, 00:19
Re: PROBLEMA LARP - by Freakzz - 15.06.2010, 17:47
Re: PROBLEMA LARP - by Pawno_Scripter - 16.06.2010, 23:39
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 26.10.2010, 22:23
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 29.10.2010, 10:15
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 29.10.2010, 13:21
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Crystyan12 - 29.10.2010, 16:54
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 29.10.2010, 17:34
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 29.10.2010, 19:39
Re: Probleme cu gamemode-ul "The Godfather", si altele - by MrBlack1995 - 31.10.2010, 17:26
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 31.10.2010, 20:48
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 31.10.2010, 20:53
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 02.11.2010, 18:49
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 02.11.2010, 19:00
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 04.11.2010, 08:17
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 06.11.2010, 14:36
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 07.11.2010, 15:21
Probleme cu gamemode-ul "The Godfather", si altele - by [NoV]LaZ - 07.11.2010, 15:30
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 07.11.2010, 17:22
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Skaizo - 12.11.2010, 13:49
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 12.11.2010, 18:43
Re: Probleme cu gamemode-ul "The Godfather", si altele - by traficgamesro - 13.11.2010, 20:05
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Mihai_Marius - 14.11.2010, 16:49
Re: Probleme cu gamemode-ul "The Godfather", si altele - by doryn3l - 25.01.2011, 03:34
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Gabb0411 - 25.01.2011, 12:48
Va rog Frumos! - by Diaz112 - 25.01.2011, 12:59
Re: Va rog Frumos! - by Skizu - 25.01.2011, 18:09
Re: Probleme cu gamemode-ul "The Godfather", si altele - by doryn3l - 25.01.2011, 18:15
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Gabb0411 - 25.01.2011, 18:40
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Skizu - 27.01.2011, 14:02
Re: Probleme cu gamemode-ul "The Godfather", si altele - by gabitzu4ever - 27.01.2011, 14:43
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Skizu - 27.01.2011, 16:45
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Gabb0411 - 27.01.2011, 20:01
Re: Problema Masini - by MoroDan - 23.07.2011, 15:21
Re: Probleme cu gamemode-ul "The Godfather", si altele - by SpeedyRO - 23.07.2011, 15:23
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Tudor23 - 23.07.2011, 16:02
Re: Probleme cu gamemode-ul "The Godfather", si altele - by SpeedyRO - 23.07.2011, 16:09
Re: Probleme cu gamemode-ul "The Godfather", si altele - by IcE. - 23.07.2011, 18:29
Re: [help]wanted - by Visio - 23.07.2011, 18:46
Re: [help]wanted - by MoroDan - 23.07.2011, 19:41
Re: [help]wanted - by fordawinzz - 23.07.2011, 19:49
Re: Probleme cu gamemode-ul "The Godfather", si altele - by MoroDan - 23.07.2011, 19:52
Re: [help]wanted - by MoroDan - 23.07.2011, 19:54
Erori /veh - by Visio - 24.07.2011, 11:02
Re: Probleme cu gamemode-ul "The Godfather", si altele - by MoroDan - 24.07.2011, 13:59
putin ajutor va rog - by Killer2019 - 26.07.2011, 16:29
Re: putin ajutor va rog - by Skaizo - 26.07.2011, 16:34
3dtext la fiecare casa si biz si icon la fiecare casa - by wikedx - 21.05.2012, 17:01
Re: 3dtext la fiecare casa si biz si icon la fiecare casa - by michael.luciano - 21.05.2012, 19:23
Sistem Factiuni - by TinKode - 24.05.2012, 10:41
Re: Sistem Factiuni - by michael.luciano - 24.05.2012, 11:14
Re: Sistem Factiuni - by TinKode - 24.05.2012, 11:19
Re: Sistem Factiuni - by michael.luciano - 24.05.2012, 11:30
Re: Sistem Factiuni - by DokerJr - 24.05.2012, 12:07
Re: Sistem Factiuni - by TinKode - 24.05.2012, 12:17
Re: Sistem Factiuni - by michael.luciano - 24.05.2012, 12:26
Re: Sistem Factiuni - by Skaizo - 24.05.2012, 12:30
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 01.09.2012, 12:10
Re: Probleme cu gamemode-ul "The Godfather", si altele - by SounDD - 01.09.2012, 12:22
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 01.09.2012, 14:36
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 01.09.2012, 14:42
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 02.09.2012, 10:28
Re: Probleme cu gamemode-ul "The Godfather", si altele - by rBcollo - 02.09.2012, 11:09
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 02.09.2012, 11:21
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 02.09.2012, 11:30
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 02.09.2012, 11:33
Problema HQ - by AwP_sTyLE - 04.09.2012, 15:19
Re: Problema HQ - by Gabyyy - 04.09.2012, 18:30
Re: Probleme cu gamemode-ul "The Godfather", si altele - by AwP_sTyLE - 04.09.2012, 19:38
Re: Probleme cu gamemode-ul "The Godfather", si altele - by RaZVaN ^ xD - 08.09.2012, 09:43
Re: Probleme cu gamemode-ul "The Godfather", si altele - by AwP_sTyLE - 11.09.2012, 06:49
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 11.09.2012, 17:54
Re: Probleme cu gamemode-ul "The Godfather", si altele - by fanatycoland - 15.09.2012, 10:29
VA rog ajutatima am o problema - by Claudytzu - 17.09.2012, 10:05
Re: Probleme cu gamemode-ul "The Godfather", si altele - by fanatycoland - 17.09.2012, 12:55
Crash la masinile factiunii - by SilviuCS - 20.09.2012, 22:15
Am o problema cu /accept job - by SilviuCS - 24.09.2012, 09:22
Problema masini personale. - by Addons - 24.09.2012, 16:49
Re: Probleme - Help me ! - by DiGiTaL_AnGeL - 24.09.2012, 18:03
Re: Probleme - Help me ! - by alexandrusava93 - 24.09.2012, 19:34
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 26.09.2012, 16:09
Cateva Intrebari - by GrigoGT - 09.10.2012, 14:12
Problema Payday - by Jony_Cruze - 18.10.2012, 16:20
Re: Problema Payday - by DiffeReNt - 22.10.2012, 14:49
Re: Problema Payday - by jamal1992 - 24.10.2012, 20:10
Re: Problema Payday - by DiGiTaL_AnGeL - 25.10.2012, 13:05
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiffeReNt - 01.11.2012, 18:11
Re: Probleme cu gamemode-ul "The Godfather", si altele - by jamal1992 - 14.11.2012, 04:56
Re: Probleme cu gamemode-ul "The Godfather", si altele - by DiGiTaL_AnGeL - 14.11.2012, 12:16
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Viken - 08.12.2012, 18:44
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Gabyyy - 09.12.2012, 10:15
Re: Probleme cu gamemode-ul "The Godfather", si altele - by Viken - 10.12.2012, 11:23
Wat System si alte Scripturi. - by Rien - 04.03.2013, 18:57
Re: Wat System si alte Scripturi. - by myhaitza97 - 04.03.2013, 19:02
Re: Wat System si alte Scripturi. - by Rien - 05.03.2013, 05:43
Re: Wat System si alte Scripturi. - by catamarg1 - 05.03.2013, 07:36
Re: Wat System si alte Scripturi. - by Rien - 05.03.2013, 08:08
Cum sa fac rost de pluginurile de ppc din lista: - by SkyRay - 17.08.2014, 14:31
Re: Probleme cu gamemode-ul "The Godfather", si altele - by HDITommy - 21.08.2015, 19:32

Forum Jump:


Users browsing this thread: 18 Guest(s)