Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////FIXHOUR/////////////////////
- public FixHour(hour)
- {
- hour = timeshift+hour;
- if (hour < 0)
- {
- hour = hour+24;
- }
- else if (hour > 23)
- {
- hour = hour-24;
- }
- shifthour = hour;
- return 1;
- }
- /////////////////BEFEHL UM ZU SEHEN WIE SPÄT ES IST///////////////////////////////
- CMD:time(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new mtext[20];
- new string[128];
- new year, month,day;
- getdate(year, month, day);
- if(month == 1) { mtext = "Jänner"; }
- else if(month == 2) { mtext = "Februar"; }
- else if(month == 3) { mtext = "März"; }
- else if(month == 4) { mtext = "April"; }
- else if(month == 5) { mtext = "Mai"; }
- else if(month == 6) { mtext = "Juni"; }
- else if(month == 7) { mtext = "Juli"; }
- else if(month == 8) { mtext = "August"; }
- else if(month == 9) { mtext = "September"; }
- else if(month == 10) { mtext = "Oktober"; }
- else if(month == 11) { mtext = "November"; }
- else if(month == 12) { mtext = "Dezember"; }
- new hour,minuite,second;
- gettime(hour,minuite,second);
- FixHour(hour);
- hour = shifthour;
- if (minuite < 10)
- {
- if (PlayerInfo[playerid][pJailTime] > 0)
- {
- format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:0%d~g~|~n~~w~Knastzeit: %d Sekunden", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
- }
- else
- {
- format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite);
- }
- }
- else
- {
- if (PlayerInfo[playerid][pJailTime] > 0)
- {
- format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:%d~g~|~n~~w~Knastzeit: %d Sekunden", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
- }
- else
- {
- format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
- }
- }
- new sendername[MAX_PLAYER_NAME];
- GameTextForPlayer(playerid, string, 5000, 1);
- format(string, sizeof(string), "* %s schaut auf seine Uhr.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,0,0,0,0);
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment