[Pomoc] Sat


Započeo LoOdaK, April 23, 2015, 19:21:31 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: moja
Detaljan opis problema: napravio sam textdraw za sat i sada hocu da mi taj sat kada udjem u igru prikazuje vrijeme u real life znaci i ako ja izadjem sa srw i udjem nakon 10 minuta bude kao da je proslo 10 minuta u pravom zivotu
Dio skripte:ako treba nesto
Neke slike/video za lakse dobivanje pomoci(neobavezno):////////
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



Denis_Lapi

*

Balkan SA:MP Web Designer

Treba ti funkcija GetTime(), TextDrawShowForPlayer i TextDrawSetString

Kada igrac udje na server prikazes mu prvo TD i onda napravis timer koji ce na neko vreme da uzima preko f-je Get Time vreme u RL-u, onda vrednost iz f-je GetTime string-ujes u TD i opet ga prikazes.


new Hour, Minute, Second;
gettime(Hour, Minute, Second);


TextDrawSetString(TDID, Hours); 
TextDrawShowForPlayer(playerid, TDID);


Evo nesto sam ti na brzinu sklopio da shvatis proces, sad ti naravno napravi timer u OnGameModeInit koji ce u publicu tog timera da gleda vreme u RL

[FS] Bank Sistem
[TuT] Array Sistem (Napredna)


"Pa krenite na mene i provesce te se super ko kapetan Kuka kada levom brise dupe"

www.denis-lapi.com

Brt izvini ali nisam bas dobro shvatio mozes li mi malo pojasniti?
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



Denis_Lapi

*

Balkan SA:MP Web Designer

Citat: =- Dolke -= poslato April 23, 2015, 20:33:47 POSLE PODNE
Brt izvini ali nisam bas dobro shvatio mozes li mi malo pojasniti?
Sta ti konkretno nije jasno?

[FS] Bank Sistem
[TuT] Array Sistem (Napredna)


"Pa krenite na mene i provesce te se super ko kapetan Kuka kada levom brise dupe"

www.denis-lapi.com

Pa ovo kako napraviti timer na koliko i public od timera sta trebam dodati
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



new Text:HClock;
new Text:HClock2;
forward TimeUpdate();
public TimeUpdate()
{
	new Hour, Min, Sec, Day, Month, Year;
	new TimeString[256], TimeString2[256], TimeString3[256];
	gettime(Hour, Min, Sec);
	getdate(Year, Month, Day);
	if(Min <= 9)
	{
		format(TimeString,25,"%d:0%d",Hour, Min);
		}else{
		format(TimeString,25,"%d:%d",Hour, Min);
	}
	if(Sec <= 9)
	{
		format(TimeString2,25,"0%d", Sec);
		}else{
		format(TimeString2,25,"%d", Sec);
	}
	if(Day <= 9)
	{
		format(TimeString3,25,"0%d/%d/%d", Day, Month, Year);
		}else{
		format(TimeString3,25,"%d/%d/%d", Day, Month, Year);
	}
	TextDrawSetString(HClock,TimeString);
	TextDrawShowForAll(HClock);
	TextDrawSetString(HClock2,TimeString2);
	TextDrawShowForAll(HClock2);
	return 1;
}

pod ongamemodeinit
SetTimer("TimeUpdate",1000,1);

        HClock = TextDrawCreate(547, 40, "--:--");
	TextDrawLetterSize(HClock, 0.5, 1.5);
	TextDrawFont(HClock, 2);
	TextDrawSetShadow(HClock, 1);
	TextDrawSetOutline(HClock,1);
        TextDrawColor(HClock, 0xFF8000C8);

	HClock2 = TextDrawCreate(607, 40, "--");
	TextDrawLetterSize(HClock2, 0.4, 1.1);
	TextDrawFont(HClock2, 2);
	TextDrawSetShadow(HClock2, 1);
	TextDrawSetOutline(HClock2,1);
	TextDrawColor(HClock2, 0xFF8000C8);


to je to ja msm
~ Server Pernambucho Roleplay ~
Forum : ~ http://pernambucho.com/ ~
Facebook :~ https://www.facebook.com/events/331686430351597 ~

Owner : JA :D

Hvala vam radi i da ne otvaram novu temu da ovde pitam kako bih mogao napraviti ako je igrac VIP 5 da kada udje na srw da ima FULL armor i health posto je donator pa ajde da ima nesto
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



Denis_Lapi

*

Balkan SA:MP Web Designer

u OnPlayerConnect stavis proveru preko if

if(PlayerInfo[playerid][pVip] >= 5)
{

  SetPlayerHealth(playerid, 100);
  SetPlayerArmour(playerid, 100);
}


Prilagodi varijable sebi.

[FS] Bank Sistem
[TuT] Array Sistem (Napredna)


"Pa krenite na mene i provesce te se super ko kapetan Kuka kada levom brise dupe"

www.denis-lapi.com

LOCK
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!