22.06.2010, 05:42
Bom e venho aqui pedir ajuda a como fazer uma contagem que so admin pode fazer
Codes
Comeзo do GM
no CommandText
No final do GM
Tirei do Blog do Drakon mas nгo sei tirar duvidas la
Me ajudem namoral
Codes
Comeзo do GM
pawn Код:
new Contar;
forward Contar10(playerid);
forward Contar9(playerid);
forward Contar8(playerid);
forward Contar7(playerid);
forward Contar6(playerid);
forward Contar5(playerid);
forward Contar4(playerid);
forward Contar3(playerid);
forward Contar2(playerid);
forward Contar1(playerid);
forward Correr(playerid);
pawn Код:
if(strcmp(cmdtext, "/admincontarr", 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), "%s Comeзou a contagem!", sendername);
Contar = 1;
SetTimerEx("Contar10", 500, false, "d", playerid);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
pawn Код:
public Contar10(playerid)
{
SetTimerEx("Contar9", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[10]", 1500, 3);
return 1;
}
public Contar9(playerid)
{
SetTimerEx("Contar8", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[9]", 1500, 3);
return 1;
}
public Contar8(playerid)
{
SetTimerEx("Contar7", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[8]", 1500, 3);
return 1;
}
public Contar7(playerid)
{
SetTimerEx("Contar6", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[7]", 1500, 3);
return 1;
}
public Contar6(playerid)
{
SetTimerEx("Contar5", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[6]", 1500, 3);
return 1;
}
public Contar5(playerid)
{
SetTimerEx("Contar4", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[5]", 1500, 3);
return 1;
}
public Contar4(playerid)
{
SetTimerEx("Contar3", 1000, false, "d", playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
}
GameTextForAll("~b~[4]", 1500, 3);
return 1;
}
public Contar3(playerid)
{
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~A corrida comeзou !", 1500, 3);
return 1;
}
Tirei do Blog do Drakon mas nгo sei tirar duvidas la
Me ajudem namoral