26 de fev. de 2011

[COD] Criando um Contar [PEDIDO]

Ai Galera Mais Uma Vez eu [KnD]Anderson[]_ Estarei Enssinando Como Criar um Contar Para seu Servidor de Drifr Pela Preferençia Então Vamos La
Primeiramente Coloque o Codigo a Baixo em

OnPlayerCommandText

if(strcmp(cmdtext, "/contar", true) == 0)
{
if (Contar == 1) return SendClientMessage(playerid, COLOR_RED, "Contagem em Progresso!");
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[256];
format(string, sizeof(string), "Player %s Começou a contagem!", sendername);
Contar = 1;
SetTimerEx("Contar3", 500, false, "d", playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}

No Final do GM Crie um Public

public Contar3(playerid)

Quando vc Criar o Public Adicione o Seguinte Codigo

SetTimerEx("Contar2", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[3]", 1500, 3);
return 1;
}
public Contar2(playerid)
{
SetTimerEx("Contar1", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[2]", 1500, 3);
return 1;
}
public Contar1(playerid)
{
SetTimerEx("Correr", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[1]", 1500, 3);
return 1;

}
public Correr(playerid)
{
Contar = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
}
GameTextForAll("~r~Go! DKB Go!", 1500, 3);
return 1;
}

Pronto Compile Seu GM e Seja Feliz
Tutorial By[KnD]Anderson[]_

0 comentários:

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by Blogger