(TUT)Colocando Sistema de Bom dia

Vá até a public OnPlayerRequestSpawn(playerid) e adcione o seguinte código :

new stringx[264];
new Hour, Min, Sec;
gettime(Hour,Min,Sec);

switch(Hour){
case 0..5:
{
format(stringx, sizeof(stringx), "~b~Boa Madruga");
GameTextForPlayer(playerid, stringx, 5000, 1);
}
case 6..11:
{
format(stringx, sizeof(stringx), "~b~Bom Dia");
GameTextForPlayer(playerid, stringx, 5000, 1);
}
case 12..18:
{
format(stringx, sizeof(stringx), "~b~Boa Tarde");
GameTextForPlayer(playerid, stringx, 5000, 1);
}
case 19..23:
{
format(stringx, sizeof(stringx), "~b~Boa Noite");
GameTextForPlayer(playerid, stringx, 5000, 1);
}
}
return 1;
}

Depois compile seu gm e Pronto !!!

0 comentários:

Postar um comentário