2v2 Duels.
#11

Either i failed to understand you, or you fully failed to understand the problem, anyway, i've done it like this:

PHP код:
IsPlayerDead[playerid] = true;
    new 
str[128], pname[24], pname1[24];
    
GetPlayerName(playeridpnamesizeof(pname));
    
GetPlayerName(GetPartnerID(playerid), pname1sizeof(pname1));
    if(
IsInDuel[playerid] && !IsPlayerDead[GetPartnerID(playerid)]) 
    {
        
IsPlayerDead[playerid] = true
        
SetPlayerPos(playerid, -467.8871,-1804.9890,1762.0316);
        
SendClientMessage(playerid, -1""R"You've died, but your partner is still alive, please wait till they finish!");
        
format(strsizeof(str), ""G"Player %s(%i) (%s(%i)'s partner) died!",pnameplayeridpname1,GetPartnerID(playerid) );
        
SendMessageToDuel(str);
    }    
    if(
IsInDuel[playerid] && IsPlayerDead[GetPartnerID(playerid)] && mData[0][Round] == 0)
    {
        new 
pname2[24], pname3[24], pname4[24], pname5[24];
        
GetPlayerName(mData[0][ids][3], pname224);
        
GetPlayerName(mData[0][ids][0], pname324);
        
GetPlayerName(mData[0][ids][1], pname424);
        
GetPlayerName(mData[0][ids][2], pname524);
        
format(strsizeof(str), ""G"%s(%i) & %s(%i) Won Round 1/2 "R"VS"G" %s(%i) & %s(%i)... next round is now starting!",pname2mData[0][ids][3], pname3mData[0][ids][0], pname4mData[0][ids][1], pname5mData[0][ids][2] );
        
SendClientMessageToAll(-1str);
    
        
SendMessageToDuel(""YE"[ROUND 2]"G"The Duel is now starting...");
        
SetPlayerPos(mData[0][ids][3], -465.8945,-1824.0327,1755.5266), SetPlayerPos(mData[0][ids][0], -465.9754,-1820.6588,1755.5266), SetPlayerPos(mData[0][ids][1], -420.5116,-1820.4299,1755.5266), SetPlayerPos(mData[0][ids][2], -420.3315,-1823.3230,1755.5266);
        
ResetPlayerWeapons(mData[0][ids][3]), ResetPlayerWeapons(mData[0][ids][0]), ResetPlayerWeapons(mData[0][ids][1]), ResetPlayerWeapons(mData[0][ids][2]); 
        
GivePlayerWeapon(mData[0][ids][3], mData[0][weaponID], 999999), GivePlayerWeapon(mData[0][ids][0], mData[0][weaponID], 999999), GivePlayerWeapon(mData[0][ids][1], mData[0][weaponID], 999999), GivePlayerWeapon(mData[0][ids][2], mData[0][weaponID], 999999); 
        
SetPlayerHealth(mData[0][ids][3], 100), SetPlayerHealth(mData[0][ids][0], 100), SetPlayerHealth(mData[0][ids][1], 100), SetPlayerHealth(mData[0][ids][2], 100);
        
SetPlayerArmour(mData[0][ids][3], 100), SetPlayerArmour(mData[0][ids][0], 100), SetPlayerArmour(mData[0][ids][1], 100), SetPlayerArmour(mData[0][ids][2], 100);        
        
TogglePlayerControllable(mData[0][ids][3], 0), TogglePlayerControllable(mData[0][ids][0], 0), TogglePlayerControllable(mData[0][ids][1], 0), TogglePlayerControllable(mData[0][ids][2], 0);
        
mData[0][Round] = 1;
        
Partner[mData[0][ids][3]] = mData[0][ids][0];
        
Partner[mData[0][ids][0]] = mData[0][ids][3];
        
Partner[mData[0][ids][1]] = mData[0][ids][2];
        
Partner[mData[0][ids][2]] = mData[0][ids][1];
        
countdown 5;
        
cdTimer SetTimer("cd"1000true);
    
    }
    return 
1;

Reply


Messages In This Thread
2v2 Duels. - by iLearner - 10.01.2017, 12:54
Re: 2v2 Duels. - by coool - 10.01.2017, 13:02
Re: 2v2 Duels. - by Manyula - 10.01.2017, 13:30
Re: 2v2 Duels. - by iLearner - 10.01.2017, 13:33
Re: 2v2 Duels. - by Manyula - 10.01.2017, 13:45
Re: 2v2 Duels. - by oMa37 - 10.01.2017, 14:50
Re: 2v2 Duels. - by coool - 10.01.2017, 15:10
Re: 2v2 Duels. - by iLearner - 10.01.2017, 15:12
Re: 2v2 Duels. - by iLearner - 10.01.2017, 18:17
Re: 2v2 Duels. - by Private200 - 10.01.2017, 18:49
Re: 2v2 Duels. - by iLearner - 10.01.2017, 19:43
Re: 2v2 Duels. - by Private200 - 10.01.2017, 19:59

Forum Jump:


Users browsing this thread: 1 Guest(s)