Wysłany: 2013-08-16, 15:57
Qadax
Wiek: 36 Na forum: 4777 dni Posty: 36
Piwa : 3
Jak zrobi? ?ycie kt?re b?dzie spada?o? np. po mini?ciu 5 sekund odejmie nam warto?? 1 HP ?
Oraz jaki warunek, aby ta funkcja dzia?a?a tylko po wpisaniu komendy, a po ?mierci si? ona wy??cza?a?
Wysłany: 2013-08-16, 17:11
IgrexolonO
Wiek: 34 Na forum: 6809 dni Posty: 1386
Piwa : 1062
Kod: nigguhTimer[MAX_PLAYERS];
Kod: CMD:jakaskomenda(playerid, p[])
{
nigguhTimer[playerid] = SetTimerEx("@_minusDatNigguh", 5000, true, "d", playerid);
return true;
}
Kod: forward @_minusDatNigguh(playerid);
@_minusDatNigguh(playerid)
{
if(!IsPlayerConnected(playerid)) KillTimer(nigguhTimer[playerid]);
new Float:hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-1.0);
return true;
}
+
OnPlayerDeath:
Kod: KillTimer(nigguhTimer[playerid]);
Tagi: spadające
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: