[Ajuda] Comando Aqui.
#2

pawn Код:
//No topo
new bool:GuerraIniciada = false;

CMD:guerra(playerid,params[])
{
    if(GetPlayerTeam(playerid) != 2)
    if(GetPlayerTeam(playerid) != 3)
    return SendClientMessage(playerid,Cinza_Escuro,"[x] Comando Indisponнvel Para sua {09D6E1}Organizaзгo");

    if(GuerraIniciada == true)
    return SendClientMessage(playerid,Cinza_Escuro, "[x] Uma Guerra Jб Foi {09D6E1}Iniciada.");

    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    guerra = GangZoneCreate(X-200,Y-200,X+200,Y+200);
    GangZoneShowForAll(guerra,-1);
    SetTimer("guerrat",60000,0); // Tempo Guerra 1 min
    GuerraIniciada = true;

    new pname[25], s[150];
    GetPlayerName(playerid, pname, 25);
    format(s, sizeof(s), "{19ED0D}[GUERRA] {FFFFFF}O {09D6E1}Terrorista {FFFFFF}%s Acaba De Iniciar uma {09D6E1}Guerra.", pname);
    SendClientMessageToAll(Branco, s);
    return 1;
}

public guerrat(playerid)
{
    GangZoneDestroy(guerra);
    GangZoneHideForAll(guerra);
    SendClientMessageToAll(Branco, "{09D6E1}[Guerra] {FFFFFF}A Guerra Foi {09D6E1}Finalizada {FFFFFF}Pelo Governo {09D6E1}Federal");
    GuerraIniciada = false;
    return 1;
}
neste caso, a variavel nгo deve ter uma para cada player, mas sim uma geral.
Reply


Messages In This Thread
Comando Aqui. - by Lucas-Fc - 24.10.2012, 00:02
Re: Comando Aqui. - by leandro123456 - 24.10.2012, 00:07
Re: Comando Aqui. - by ForT - 24.10.2012, 00:08
Re: Comando Aqui. - by Lucas-Fc - 24.10.2012, 00:10
Re: Comando Aqui. - by leandro123456 - 24.10.2012, 00:14
Re: Comando Aqui. - by Lucas-Fc - 24.10.2012, 00:14
Re: Comando Aqui. - by Lucas-Fc - 24.10.2012, 00:23
Re: Comando Aqui. - by ForT - 24.10.2012, 00:42
Re: Comando Aqui. - by Lucas-Fc - 24.10.2012, 00:44

Forum Jump:


Users browsing this thread: 1 Guest(s)