[Pomoc] Health effects

Započeo yabb3, Septembar 12, 2013, 03:11:52 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

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);
}
}


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.

health kako to moze da ima veze sa vremenom ?

i am king!

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...


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.

napravi poseban timer koji ce se ponavljati sta ja znam svakih 1 sec i stavi ove prvojere

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);
}
}
Poslednja Izmena: Septembar 12, 2013, 15:42:27 POSLE PODNE od KuNNaâ„¢

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 -.-


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.

postavi igraču health na 100 kada se konektuje i onda probaj



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.

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


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.

jel si pogledao?


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.