[Ajuda] Sistema de Duelo
#3

entгo ficaria tipo assim:

pawn Код:
CMD:duel(playerid,params[])
{
    new
        string[150],
        Float:vida[MAX_PLAYERS]
    ;

    GetPlayerHealth(playerid,vida[playerid]);

    if(NoDuelo[playerid] == true) return SendClientMessage(playerid,red,"ERROR: You are in duel");
    if(DueloSendoUsado == 1) return SendClientMessage(playerid,red,"ERROR: One duel already happening");
    if(duelid == 0 || 11) return SendClientMessage(playerid,red,"ERROR: Duel styles is of 1 on 10!");
    if(sscanf(params,"d",duelid)) return SendClientMessage(playerid,red,"USAGE: /duel [duel id]");


    if(vida[playerid] <= 100)
    {
        format(string,sizeof(string),"[DUEL]: %s teleported to the duel %d ( /duel )",Nome(playerid),duelid);
        SendClientMessageToAll(ciano,string);
    }
    else
    {
        SendClientMessage(playerid,red,"ERROR: Need of full health");
    }

    if(jogadoresnoduel[duelid] == 2)
    {
        DueloSendoUsado = 1;
    }
    else
    {
    //DUEL STYLE 1
    if(duelid == 1)
    {
        jogadoresnoduel[0] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,34,9999);
        GivePlayerWeapon(playerid,25,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 2)
    {
        jogadoresnoduel[1] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,24,9999);
        GivePlayerWeapon(playerid,25,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 3)
    {
        jogadoresnoduel[2] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,27,9999);
        GivePlayerWeapon(playerid,24,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 4)
    {
        jogadoresnoduel[3] ++;
       
        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,31,9999);
        GivePlayerWeapon(playerid,25,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 5)
    {
        jogadoresnoduel[4] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,26,9999);
        GivePlayerWeapon(playerid,32,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 6)
    {
        jogadoresnoduel[5] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,16,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 7)
    {
        jogadoresnoduel[6] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,26,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 8)
    {
        jogadoresnoduel[7] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,24,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 9)
    {
        jogadoresnoduel[8] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,18,9999);

        NoDuelo[playerid] = true;
    }
    else{
    if(duelid == 10)
    {
        jogadoresnoduel[9] ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,4,1);

        NoDuelo[playerid] = true;
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
   
    }
   
        //[Style 01]: Sniper+Shotgun
        //[Style 02]: Shotgun+Deagle
        //[Style 03]: Spas12+Deagle
        //[Style 04]: M4+Shotgun
        //[Style 05]: Sawn+Tec9
        //[Style 06]: Granade
        //[Style 07]: SwanOff
        //[Style 08]: Deagle
        //[Style 09]: Motovs
        //[Style 10]: Knife
    return 1;
}
?
Reply


Messages In This Thread
Sistema de Duelo - by s4kuL - 13.12.2012, 22:19
Re: Sistema de Duelo - by ViniBorn - 13.12.2012, 22:49
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 01:33
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 13:57
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 17:54
Re: Sistema de Duelo - by JonathanFeitosa - 14.12.2012, 17:57
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 22:31
Re: Sistema de Duelo - by s4kuL - 15.12.2012, 20:40
Re: Sistema de Duelo - by Gleisson_. - 16.12.2012, 02:31
Re: Sistema de Duelo - by s4kuL - 16.12.2012, 06:28

Forum Jump:


Users browsing this thread: 2 Guest(s)