Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: mrockxkingbutt on February 08, 2014, 07:37:42 pm
-
:D
Changelog!!
For A Better Touch!!
Add
Hours[MAX_PLAYERS];
Days[MAX_PLAYERS];
Minutes[MAX_PLAYERS];
Seconds[MAX_PLAYERS];
Add This In OnPlayerText
else if(strcmp(cmd, "!time", true) == 0) {
new none[127];
format(none,sizeof(none)," Time [ %d : %d : %d : %d ]", SecondsFile(playerid), MinutesFile(playerid), HoursFile(playerid),DaysFile(playerid));
GameTextForPlayerBottom(i,none);
return 1;
}
OnGameModeInIt
SetTimer("IncSeconds", 1000, 1);
SetTimer("IncMinutes", 59000, 1);
Now For Publics
public SecondsFile(playerid) {
return Seconds[playerid];
}
public DaysFile(playerid) {
return Days[playerid];
}
public MinutesFile(playerid) {
return Minutes[playerid];
}
public HoursFile(playerid) {
return Hours[playerid];
}
public IncSeconds() {
for(new i = 0; i < MAX_PLAYERS; i++) {
Seconds++;
}
for(new i = 0; i < MAX_PLAYERS; i++) {
if(Seconds == 59) {
Seconds = 0;
}
}
return 1;
}
public IncMinutes()
{
for(new i = 0; i < MAX_PLAYERS; i++) {
Minutes++;
new ss[123];
format(ss,sizeof(ss),"[Time] %d : %d : %d", SecondsFile(i), MinutesFile(i), HoursFile(i));
GameTextForPlayerBottom(i,ss);
}
for(new i = 0; i < MAX_PLAYERS; i++) {
if(Minutes == 61) {
Minutes = 0;
IncHours++;
}
}
return 1;
}
public IncHours()
{
for(new i = 0; i < MAX_PLAYERS; i++) {
Hours++;
new ss[123];
format(ss,sizeof(ss),"[Time] %d : %d : %d : %d", SecondsFile(i), MinutesFile(i), HoursFile(i),DaysFile(i));
GameTextForPlayerBottom(i,ss);
}
for(new i = 0; i < MAX_PLAYERS; i++) {
if(Hours == 25) {
Hours = 0;
Day[playerid]++;
}
}
return 1;
}
Saw A Bug Report It!!!
Credits Me
Features
Replacable By SetWorldTime
Just Can Change Weather..
+ Rcon Features To Change !!
/sethr
/setweather
Its SHow And Increases Time
Seconds Every Seconds
Minutes EVery 60 Seconds
Hours Every 60 Minutes
Days Every 24 Hour!
-
Why are you using so big size for texts you write dude ? I just don't get it. (advanced logic?)
(http://1.bp.blogspot.com/-Dj0ozuQdty4/Tx8C4x9uxYI/AAAAAAAAJ-M/7qP7lCTUqg8/s400/jackie%2Bchan.jpg)
About script... you could use just one timer, instead of three.
By the way, announcing players about increasing their playing time status at every minute is not a good idea.
And what happens when a player will play for 25 hours ? His Hours' stats will get reset.
-
Most Pawns Server Are Port Forwarded Working Only!!!
So No-One Can Port Forward ANd Run Server For 24 Hours
If Anyone Can
!!
I Will Edit It And Add Days Ok???
-
Changed !!! :)
-
why you do not use [ pawn ] teste [ /pawn ] :o
-
pawno code s**ks
-
pawno code s**ks
Quote of The Year 2014. ::)
-
pawno code s**ks
Quote of The Year 2014. ::)
:o ::)
-
Use [ code ] instead of [ quote ] or [ pawn ].
-
Next Time Ok?? :)
-
Next Time Ok?? :)
Okay ;)