22.08.2012, 14:49
About GameTextForPlayer
22.08.2012, 15:03
PHP код:
GameTextForPlayer(playerid, const string[], time, style)
Example:
PHP код:
new string[64];
format(string, sizeof(string), "~r~You don't have a watch");
GameTextForPlayer(playerid, string, 5000, 1);
22.08.2012, 15:05
This is my code..
The command
Код:
format(string, sizeof(string), "~r~Nemate sat");
Код:
if(strcmp(cmd, "/time", true) == 0 || strcmp(cmd, "/vrijeme", true) == 0) { if(IsPlayerConnected(playerid)) { new mtext[20]; new year, month,day; getdate(year, month, day); if(month == 1) { mtext = "Januar"; } else if(month == 2) { mtext = "Februar"; } else if(month == 3) { mtext = "Mart"; } else if(month == 4) { mtext = "April"; } else if(month == 5) { mtext = "Maj"; } else if(month == 6) { mtext = "Jun"; } else if(month == 7) { mtext = "Jul"; } else if(month == 8) { mtext = "Avgust"; } else if(month == 9) { mtext = "Septembar"; } else if(month == 10) { mtext = "Oktobar"; } else if(month == 11) { mtext = "Novembar"; } else if(month == 12) { mtext = "Decembar"; } new hour,minuite,second; gettime(hour,minuite,second); FixHour(hour); hour = shifthour; if (minuite < 10) { if (PlayerInfo[playerid][pJailTime] > 0) { if(PlayerInfo[playerid][pWatch] == 1) { format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|~n~~w~Jail Vremena ostalo: %d sec", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10); } else { format(string, sizeof(string), "~w~Zatvorska kazna: %d sec", PlayerInfo[playerid][pJailTime]-10); } } else { if(PlayerInfo[playerid][pWatch] == 1) { format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite); } else { format(string, sizeof(string), "~r~Nemate sat"); } } } else { if (PlayerInfo[playerid][pJailTime] > 0) { if(PlayerInfo[playerid][pWatch] == 1) { format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|~n~~w~Zatvorska kazna: %d sec", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10); } else { format(string, sizeof(string), "~w~Zatvorska kazna: %d sec", PlayerInfo[playerid][pJailTime]-10); } } else { if(PlayerInfo[playerid][pWatch] == 1) { format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite); } else { format(string, sizeof(string), "~r~Nemate sat"); } } } GameTextForPlayer(playerid, string, 5000, 2); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pWatch] == 1) { if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s podize ruku i gleda koliko je sati.", sendername); } else { format(string, sizeof(string), "* %s podize ruku i gleda koliko je sati.", 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; }
22.08.2012, 15:38
Well isn't game text style 2 supposed to be bugged and cause problems ? Or is that fixed now ? (Doesn't seem like it)
22.08.2012, 15:56
Yes it is bugged, I replaced every game style 2 to 1 and it works, thanks anyway
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)