[AJUDA] Gamemode Tempo -
GuiihCamargo - 22.03.2012
Olhem oque pode ser isto?
[ame]http://www.youtube.com/watch?v=rQ0nRUeqGg8[/ame]
Re: [AJUDA] Gamemode Tempo -
steeldark - 22.03.2012
ja ti passei um codigo q corrigia isso, creio.
Re: [AJUDA] Gamemode Tempo -
ViniBorn - 22.03.2012
Teu relуgio ta usando SetWeather?
Re: [AJUDA] Gamemode Tempo -
GuiihCamargo - 22.03.2012
Quote:
Originally Posted by Viniborn
Teu relуgio ta usando SetWeather?
|
Procurei: SetWeather no meu gm e so deu isto:
pawn Код:
if(strcmp(cmd,"/clima",true) == 0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] > 2){
new weatherid;
tmp = strtok(cmdtext,idx);
weatherid = strval(tmp);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "Digite: /clima [id-do-clima]");
return 1;
}
if(weatherid < -66 || weatherid > 45){
SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido! Digite um ID acima de 45 e abaixo de 67.");
return 1;
}else{
SetWeather(weatherid); // AQUI
new Names[30];
GetPlayerName(playerid,Names,sizeof(Names));
format(string,sizeof(string),"(INFO) O Administrador %s (%d) alterou o clima.",Names,playerid);
SendClientMessageToAll(tcadm, string);
return 1;
}
}
}
pawn Код:
if(strcmp("/aclima", cmdtext, true, 10) == 0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6){
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nao e um admin!");
return 1;
}
if(pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6){
new texto[256];
Previsao = random(20);
format(texto,sizeof(texto),"(INFO) O Clima de hoje й: %s",WeatherName[Previsao]);
SendClientMessageToAll(0xFFFFFFAA,texto);
SetWeather(Previsao); // AQUI
}
return 1;
}
pawn Код:
/*public Clima(){
new texto[256];
Previsao = random(20);
format(texto,sizeof(texto),"(INFO)Clima: %s",WeatherName[Previsao]);
SendClientMessageToAll(0x93FFFFAA,texto);
SetWeather(Previsao);
}*/
Re: [AJUDA] Gamemode Tempo -
ViniBorn - 22.03.2012
Tem algum timer com a public Clima() ?
Re: [AJUDA] Gamemode Tempo -
GuiihCamargo - 22.03.2012
Quote:
Originally Posted by Viniborn
Tem algum timer com a public Clima() ?
|
Sу tem isto ae que eu postei mesmo...
Re: [AJUDA] Gamemode Tempo -
Lucas_Alemao - 22.03.2012
ta usando o FS gl_realtime?
Re: [AJUDA] Gamemode Tempo -
GuiihCamargo - 22.03.2012
Quote:
Originally Posted by Lucas_Alemao
ta usando o FS gl_realtime?
|
Nгo...
Re: [AJUDA] Gamemode Tempo -
steeldark - 22.03.2012
Quote:
Originally Posted by GuiihCamargo
Nгo...
|
coloca isso no teu server..
pawn Код:
//no topo do gm
forward tempo();
// no OnGameModInit
SetTimer("tempo",500,true);
//no final do gm
public tempo()
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
if(Hour >= 06 && Hour <= 18){
SetWorldTime(12);
SetWeather(12);
}
else
{
SetWorldTime(24);
SetWeather(24);
}
}
ou pega esse fs aqui, e coloca no gm. Testado.