23.05.2018, 14:48
1 you forgot to declare health
2 you'r brackets were bad
fix:
2 you'r brackets were bad
PHP код:
if
}
}
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == City)
{
GameTextForPlayer(playerid, " Estas En Tierra Robada ", 6000,1);
GivePlayerWeapon(playerid, 46, 1);
SetPlayerHealth(playerid, 94);
SetPlayerPos(playerid,-1492.5255,2509.5999,601.1897);
SetPlayerVirtualWorld(playerid, -1);
SetTimerEx("FuncionVida",1000,true,"i",playerid);
}
return 1;
}
forward FuncionVida();
public FuncionVida()
{
new Float:health;
for(new i;i<MAX_PLAYERS;i++)
{
new funcionvidaa[i] = SetTimerEx("FuncionVida",1000,true,"i",playerid);
if(IsPlayerConnected(i)) // Verifica que el jugador estй conectado y logeado
{
GetPlayerHealth(i, health); //Estableciendo el valor flotante health con GetPlayerHealth
if(health > 0 && < 95)
{ //Si su vida es mayor a 0...
SetPlayerHealth(i, health+5); //Da +5 de vida al jugado
}
if(health > 95)
{
KillTimer(funcionvidaa[i])
}
return 1;
}