Habilitar maquinas expendedoras
#1

Hola, nose porque no me funcionan las maquinas de sodas ni chocolates osea hace la animacion pero no le da la vida.
Creo que es por estos codigos. їEs por eso?
Код:
new HasArmor			[MAX_PLAYERS];
new Float:ScriptArmor	[MAX_PLAYERS];
function SetHP(playerid, Float:hp)
{
    Info[playerid][pHealth] =hp;
    SetPlayerHealth(playerid, hp);
    return 1;
}

function GiveArmorToPlayer(playerid, Float:armour)
{
	SetPlayerArmour(playerid, Float:armour);
	HasArmor[playerid] = 1;
	ScriptArmor[playerid] = armour;
	return 1;
}
timer Anticheat[1000]()
{
	foreach(Player, i)
	{
	    if(IsPlayerConnected(i)){
	        new Float:health, Float:armor;
	        GetPlayerHealth(i, health);
   			if(health > Info[i][pHealth]){
			    SetPlayerHealth(i, Info[i][pHealth]);
	  		}
	        GetPlayerArmour(i, armor);
	  		if(armor > ScriptArmor[i]){
				GiveArmorToPlayer(i, ScriptArmor[i]);
			}
		}
	}
	return 1;
}
Reply
#2

juega un poco con esto!

Suerte!

pawn Код:
new animlib[32],animname[32];
      GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
      #pragma unused animname
 //animacion usada cuando compra bebida, o
      if( !strcmp(animlib,"VENDING") || !strcmp(animlib,"FOOD") )
      {



        }
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=259076

[ame]www.youtube.com/watch?v=vnwHWUM7y5o[/ame]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)