16.04.2012, 18:59
Mais completo:
pawn Code:
//TOPO DO GM
new TimerBola;
new TempoBola[MAX_PLAYERS];
//FIM DO GM
forward LBola(playerid);
public LBola(playerid)
{
if ((TempoBola[playerid]) >= 1)
{
TempoBola[playerid] --;
}
else if ((TempoBola[playerid]) <= 0)
{
SendClientMessage(playerid, 0xF68E00F6, "Vocк jб pode usar o Comando: /respawnbola novamente!");
KillTimer(TimerBola);
TempoBola[playerid] = 0;
}
return 1;
}
//ONPLAYERCOMMANDTEXT
if (strcmp("/respawnbola", cmdtext, true, 6) == 0)
{
if ((TempoBola[playerid]) >= 1)
{
TempoBola[playerid] --;
format(string, sizeof(string), "Faltam %d segundos para usar este Comando novamente.", TempoRelato[playerid]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2763.6863,-2005.3716,13.5620))
{
TempoBola[playerid] = 60;
TimerBola = SetTimerEx("LBola", 1000, true, "i", playerid);
DestroyObject(Ball);
Ball = CreateObject(2114, 2782.3027,-2019.0826,13.5547-0.8, 0, 0, 96);
SendClientMessage(playerid, -1, "Vocк respawnou a bola de basket!"); // Colocar o SetTimer aki :D
}
else
{
SendClientMessage(playerid, -1, "Vocк nгo estб perto da quadra");
}
return 1;
}
![Tongue](images/smilies/razz.gif)