11.08.2013, 16:06
Oi galera, eu tenho um FS q coloca a hora serta... mais no meu GM, nao tem hora... eu queria que ficasse a hora no GM, e eu tirava o FS, para ficar melhor os sistemas... alguem pode me ajudar?
//topo do GM
new Text:HorasTxT;
new Text:DataTxT;
//Ongamemodeinit
DataTxT = TextDrawCreate(541.000000, 27.000000, "00/00");
TextDrawBackgroundColor(DataTxT, 255);
TextDrawFont(DataTxT, 3);
TextDrawLetterSize(DataTxT, 0.500000, 2.000000);
TextDrawColor(DataTxT, -1);
TextDrawSetOutline(DataTxT, 0);
TextDrawSetProportional(DataTxT, 1);
TextDrawSetShadow(DataTxT, 1);
TextDrawSetSelectable(DataTxT, 0);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HorasTxT = TextDrawCreate(550.000000, 47.000000, "~b~--~w~:~b~--~w~:~b~--");
TextDrawBackgroundColor(HorasTxT, 255);
TextDrawFont(HorasTxT, 3);
TextDrawLetterSize(HorasTxT, 0.500000, 2.000000);
TextDrawColor(HorasTxT, -1);
TextDrawSetOutline(HorasTxT, 0);
TextDrawSetProportional(HorasTxT, 1);
TextDrawSetShadow(HorasTxT, 1);
TextDrawSetSelectable(HorasTxT, 0);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SetTimer("hora",1000,1);
//onplayerdisconect
TextDrawHideForPlayer(playerid, DataTxT);
TextDrawHideForPlayer(playerid, HorasTxT);
//OnPlayerSpawn
TextDrawShowForPlayer(playerid, DataTxT);
TextDrawShowForPlayer(playerid, HorasTxT);
public hora(playerid)
{
new str[128],
str2[128],
year,
month,
day,
hour,
minute,
second;
getdate(year,month,day);
gettime(hour,minute,second);
new mes[12];
if(month == 1) { mes = "Janeiro"; }
else if(month == 2) {mes = "Fevereiro";}
else if(month == 3) {mes = "Marзo";}
else if(month == 4) {mes = "Abril";}
else if(month == 5) {mes = "Maio";}
else if(month == 6) {mes = "Junho";}
else if(month == 7) {mes = "Julho";}
else if(month == 8) {mes = "Agosto";}
else if(month == 9) {mes = "Setembro";}
else if(month == 10) {mes = "Outubro";}
else if(month == 11) {mes = "Novembro";}
else if(month == 12) {mes= "Dezembro";}
format(str, sizeof(str), "%d de %s", day, mes,year);
TextDrawSetString(Text:DataTxT, str);
format(str2, sizeof(str2), "%d:%d:%d", hour, minute, second);
TextDrawSetString(Text:HorasTxT, str2);
}
TogglePlayerClock(playerid, 0);
C:\Users\Jonathan\Desktop\New Virtual Life\pawno\include\antibot.inc(84) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(2770) : error 017: undefined symbol "TextDrawSetSelectable"
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(2781) : error 017: undefined symbol "TextDrawSetSelectable"
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(7081) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(7085) : warning 211: possibly unintended assignment
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(12598) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(28410) : warning 235: public function lacks forward declaration (symbol "hora")
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(28834) : warning 219: local variable "anim" shadows a variable at a preceding level
C:\Users\Jonathan\Desktop\New Virtual Life\gamemodes\NVLRPG.pwn(28840) : warning 219: local variable "anim" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
#include <a_samp>
forward Updt();
public OnFilterScriptInit()
{
SetTimer("Updt", 800, true);
return 1;
}
public Updt()
{
new dt[3], i=0;
gettime(dt[0], dt[1], dt[2]);
SetWorldTime(dt[0]);
while(i < MAX_PLAYERS)
{
if(!IsPlayerConnected(i)) continue;
else SetPlayerTime(i, dt[0], dt[1]);
i++;
}
return 1;
}