[POMOC]DRINK PICA


Započeo Digimontre, Jul 04, 2011, 21:01:29 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GTARP
Detaljan opis problema: Pa evo ocu kada neko pije pivo ili nestxo kada ukuca /drink da mu se pojavi flasa i ono da pije.
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno):/
EVO VAM MOJA DRINK KOMANDA

if(strcmp(cmd, "/pice", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsPlayerInRangeOfPoint(playerid, 5, 1199.3712,-911.8286,48.0625) || IsPlayerInRangeOfPoint(playerid, 5, 243.4975,-1831.5471,3.7403)  || IsPlayerInRangeOfPoint(playerid, 5, 760.4005,-2246.6248,13.4646) || IsPlayerInRangeOfPoint(playerid, 5, 236.49996948,-1828.53015137,4.78974867) || IsPlayerInRangeOfPoint(playerid, 5, 1117.8564,-2281.6091,48.6033))
 			{
   				if(PlayerDrunk[playerid] < 10)
      			{
	                new Float:health;
	                new x_nr[256];
					x_nr = strtok(cmdtext, idx);
					if(!strlen(x_nr)) {
						SendClientMessage(playerid, COLOR_SUPER, "_______Meni Pica_______");
						SendClientMessage(playerid, COLOR_SUPER, "Komanda: /pice [ime pica]");
				  		SendClientMessage(playerid, COLOR_BLUE, "Moguca imena: Pivo ($6), Vodka ($10), Viski ($10), Voda ($0), Pepsi ($2)");
						SendClientMessage(playerid, COLOR_SUPER, "________________________");
						return 1;
					}
				    if(strcmp(x_nr,"pivo",true) == 0)
					{
					    GivePlayerMoney(playerid, - 6);
					    PlayerDrunk[playerid] += 1;
						if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~Pijani", 3500, 1); }
						if(GetPlayerHealth(playerid, health) < 100)
						{
						    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 15; SetPlayerHealth(playerid, health + hp); }
							else { SetPlayerHealth(playerid, health + 15.0); }
						}
					}
					else if(strcmp(x_nr,"vodka",true) == 0)
					{
					    GivePlayerMoney(playerid, - 10);
					    PlayerDrunk[playerid] += 2;
						if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~pijani", 3500, 1); }
						if(GetPlayerHealth(playerid, health) < 100)
						{
						    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 25; SetPlayerHealth(playerid, health + hp); }
							else { SetPlayerHealth(playerid, health + 25.0); }
						}
					}
					else if(strcmp(x_nr,"viski",true) == 0)
					{
					    GivePlayerMoney(playerid, - 10);
					    PlayerDrunk[playerid] += 3;
						if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Vi ste~n~~p~pijani", 3500, 1); }
						if(GetPlayerHealth(playerid, health) < 100)
						{
						    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
							else { SetPlayerHealth(playerid, health + 27.0); }
						}
					}
					else if(strcmp(x_nr,"voda",true) == 0)
					{
					    GivePlayerMoney(playerid, 0);
					    if(GetPlayerHealth(playerid, health) < 100)
						{
						    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
							else { SetPlayerHealth(playerid, health + 5.0); }
						}
					}
					else if(strcmp(x_nr,"pepsi",true) == 0)
					{
					    GivePlayerMoney(playerid, - 2);
					    if(GetPlayerHealth(playerid, health) < 100)
						{
						    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
							else { SetPlayerHealth(playerid, health + 5.0); }
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_SUPER, "Konobar: Neznam za to pice.");
					    return 1;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s pije %s.", sendername ,x_nr);
					ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
	            }
	            else
	            {
	                SendClientMessage(playerid, COLOR_BLUE, "   Nemozes vise piti, povratit ces !");
	                return 1;
	            }
	        }
	        else
	        {
	            SendClientMessage(playerid, COLOR_BLUE, "   Niste u baru !");
	            return 1;
	        }
	    }
	    return 1;
	}


Koristi SetPlayerSpecialAction...
Just one more time.

Citat: EM|Pacino poslato Jul 04, 2011, 21:03:06 POSLE PODNE
Koristi SetPlayerSpecialAction...
Neznam ja to ajmi ti stavi. Molim te bio bi ti zahvalan ipak si ti pr0 :D

Nije tvoja komanda ali ok...samo si je preveo

pa neka kuca :S /pica pivo

i eto
//

Citat: [A]Ricky poslato Jul 04, 2011, 21:06:01 POSLE PODNE
Nije tvoja komanda ali ok...samo si je preveo

pa neka kuca :S /pica pivo

i eto
Daj ti mi sredi da se pojavi ono pice i sve kada..

Citat: Digimontre poslato Jul 04, 2011, 21:03:59 POSLE PODNE
Citat: EM|Pacino poslato Jul 04, 2011, 21:03:06 POSLE PODNE
Koristi SetPlayerSpecialAction...
Neznam ja to ajmi ti stavi. Molim te bio bi ti zahvalan ipak si ti pr0 :D

Jasta cu, samo to znate reci, da vam ja radim... Uradite nesto sami i naucite...
Just one more time.

SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);

stavi to za pivo..ako ti treba za ostale javi
//

Citat: [A]Ricky poslato Jul 04, 2011, 21:10:39 POSLE PODNE
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);

stavi to za pivo..ako ti treba za ostale javi
Treba mi za ostalo daj molim te pomozi.

Evo ti za pepsi

Kod: c
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); //sok
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); // ovo mozes i za ostalo kombinuj i ovo i ono za pivo i ne treba ti vise
//

Citat: [A]Ricky poslato Jul 04, 2011, 21:14:19 POSLE PODNE
Evo ti za pepsi

Kod: c
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); //sok
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); // ovo mozes i za ostalo kombinuj i ovo i ono za pivo i ne treba ti vise

Xvala bate najbolji si  :D :D