Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: yabb3 poslato Septembar 12, 2013, 03:11:52 PRE PODNE

Naslov: [Pomoc] Health effects
Poruka od: yabb3 poslato Septembar 12, 2013, 03:11:52 PRE PODNE
Skripta koju koristim: Ravens edit
Problem: sta nije u redu sa ovim kodom,nakon par minuta ispod 20hp teko onda mi se pojavi lose vreme i drunk effect.
kada uradim /gmx pojavi mi se txt you're injured itd...
Ne znam sta je lose u ovoj komandi i zasto ne radi dobro

public OnPlayerUpdateEx(playerid)
{
if(IsPlayerConnected(playerid))
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health < 20.0 && IsPlayerInAnyVehicle(playerid))
{
    SetPlayerWeather(playerid, -66);
GameTextForPlayer(playerid, "~r~You're injured and needs a doctor!",5000,3);
}
else if(health < 20.0)
{
SetPlayerWeather(playerid, -66);
SetPlayerDrunkLevel(playerid,3000);
GameTextForPlayer(playerid, "~r~You're injured you need a doctor!",5000,3);
}
else
{
SetPlayerWeather(playerid, 1);
SetPlayerDrunkLevel(playerid,0);
}
}
Naslov: Odg: [Pomoc] Health effects
Poruka od: kim3205 poslato Septembar 12, 2013, 03:32:39 PRE PODNE
health kako to moze da ima veze sa vremenom ?
Naslov: Odg: [Pomoc] Health effects
Poruka od: yabb3 poslato Septembar 12, 2013, 03:53:59 PRE PODNE
Citat: |√|BE-RP|√|-Pinki ãƒ,, poslato Septembar 12, 2013, 03:32:39 PRE PODNE
health kako to moze da ima veze sa vremenom ?

Pa staviti crveno vreme kao kad koristis heroin i drunk level i hodas kao da si ranjen i lose vidis kad si pred smrt kao da si ranjen tako imas efekat,medjutim ne kontam sta nije u redu...
Naslov: Odg: [Pomoc] Health effects
Poruka od: Riv3R4 poslato Septembar 12, 2013, 06:44:51 PRE PODNE
napravi poseban timer koji ce se ponavljati sta ja znam svakih 1 sec i stavi ove prvojere
Naslov: Odg: [Pomoc] Health effects
Poruka od: Kunnaâ„¢ poslato Septembar 12, 2013, 15:37:02 POSLE PODNE
probaj ovako public OnPlayerUpdateEx(playerid)
{
if(IsPlayerConnected(playerid))
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health == 20.0 && IsPlayerInAnyVehicle(playerid))
{
    SetPlayerWeather(playerid, -66);
GameTextForPlayer(playerid, "~r~You're injured and needs a doctor!",5000,3);
}
else if(health == 20.0)
{
SetPlayerWeather(playerid, -66);
SetPlayerDrunkLevel(playerid,3000);
GameTextForPlayer(playerid, "~r~You're injured you need a doctor!",5000,3);
}
else
{
SetPlayerWeather(playerid, 1);
SetPlayerDrunkLevel(playerid,0);
}
}
Naslov: Odg: [Pomoc] Health effects
Poruka od: yabb3 poslato Septembar 12, 2013, 20:35:02 POSLE PODNE
Citat: KuNNaâ,,¢ poslato Septembar 12, 2013, 15:37:02 POSLE PODNE
probaj ovako public OnPlayerUpdateEx(playerid)
{
if(IsPlayerConnected(playerid))
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health == 20.0 && IsPlayerInAnyVehicle(playerid))
{
    SetPlayerWeather(playerid, -66);
GameTextForPlayer(playerid, "~r~You're injured and needs a doctor!",5000,3);
}
else if(health == 20.0)
{
SetPlayerWeather(playerid, -66);
SetPlayerDrunkLevel(playerid,3000);
GameTextForPlayer(playerid, "~r~You're injured you need a doctor!",5000,3);
}
else
{
SetPlayerWeather(playerid, 1);
SetPlayerDrunkLevel(playerid,0);
}
}


Probao sam,nece i dalje ne kontam -.-
Naslov: Odg: [Pomoc] Health effects
Poruka od: J0PS0NEE poslato Septembar 12, 2013, 20:44:46 POSLE PODNE
postavi igraču health na 100 kada se konektuje i onda probaj
Naslov: Odg: [Pomoc] Health effects
Poruka od: Kunnaâ„¢ poslato Septembar 12, 2013, 22:57:04 POSLE PODNE
Citat: Niko_Crawford poslato Septembar 12, 2013, 20:35:02 POSLE PODNE
Citat: KuNNaâ,,¢ poslato Septembar 12, 2013, 15:37:02 POSLE PODNE
probaj ovako public OnPlayerUpdateEx(playerid)
{
if(IsPlayerConnected(playerid))
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health == 20.0 && IsPlayerInAnyVehicle(playerid))
{
    SetPlayerWeather(playerid, -66);
GameTextForPlayer(playerid, "~r~You're injured and needs a doctor!",5000,3);
}
else if(health == 20.0)
{
SetPlayerWeather(playerid, -66);
SetPlayerDrunkLevel(playerid,3000);
GameTextForPlayer(playerid, "~r~You're injured you need a doctor!",5000,3);
}
else
{
SetPlayerWeather(playerid, 1);
SetPlayerDrunkLevel(playerid,0);
}
}


Probao sam,nece i dalje ne kontam -.-
Nemoguce probat cu ja na svom i reci cu ti dali radi.
Naslov: Odg: [Pomoc] Health effects
Poruka od: yabb3 poslato Septembar 13, 2013, 01:59:10 PRE PODNE
Citat: KuNNaâ,,¢ poslato Septembar 12, 2013, 22:57:04 POSLE PODNE
Citat: Niko_Crawford poslato Septembar 12, 2013, 20:35:02 POSLE PODNE
Citat: KuNNaâ,,¢ poslato Septembar 12, 2013, 15:37:02 POSLE PODNE
probaj ovako public OnPlayerUpdateEx(playerid)
{
if(IsPlayerConnected(playerid))
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health == 20.0 && IsPlayerInAnyVehicle(playerid))
{
    SetPlayerWeather(playerid, -66);
GameTextForPlayer(playerid, "~r~You're injured and needs a doctor!",5000,3);
}
else if(health == 20.0)
{
SetPlayerWeather(playerid, -66);
SetPlayerDrunkLevel(playerid,3000);
GameTextForPlayer(playerid, "~r~You're injured you need a doctor!",5000,3);
}
else
{
SetPlayerWeather(playerid, 1);
SetPlayerDrunkLevel(playerid,0);
}
}


Probao sam,nece i dalje ne kontam -.-
Nemoguce probat cu ja na svom i reci cu ti dali radi.

Ok
Naslov: Odg: [Pomoc] Health effects
Poruka od: yabb3 poslato Septembar 15, 2013, 20:31:52 POSLE PODNE
jel si pogledao?