married couples ? lol..
#6

If you want it to be random:

pawn Код:
new MarriedCouple[MAX_PLAYERS];

//OnPlayerConnect
MarriedCouple[playerid] = -1;
for(new i; i <= MAX_PLAYERS; i++)
{
    if(IsPlayerConected(i) && i != playerid && MarriedCouple[i] == -1) {
        MarriedCouple[playerid] = i;
        MarriedCouple[i] = playerid;
        new pname[MAX_PLAYER_NAME], iname[MAX_PLAYER_NAME], pmessage[128], imessage[128];
        GetPlayerName(playerid, pname, sizeof(pname));
        GetPlayerName(i, iname, sizeof(iname));
        format(imessage, sizeof(imessage), "%s is your married partner.", pname);
        format(pmessage, sizeof(pmessage), "%s is your married partner.", iname);
        SendClientMessage(i, COLOR_GREEN, imessage);
        SendClientMessage(playerid, COLOR_GREEN, pmessage);
        break;
    }
}

if(MarriedCouple[playerid] == -1) SendClientMessage(playerid, COLOR_RED, "There is currently no other single people online.");
Reply


Messages In This Thread
married couples ? lol.. - by Rocky Balboa - 27.09.2010, 20:56
Re: married couples ? lol.. - by Rocky Balboa - 27.09.2010, 20:58
Re: married couples ? lol.. - by Conroy - 27.09.2010, 21:05
Re: married couples ? lol.. - by Rocky Balboa - 27.09.2010, 21:06
Re: married couples ? lol.. - by Retardedwolf - 27.09.2010, 21:27
Re: married couples ? lol.. - by Conroy - 27.09.2010, 21:35
Re: married couples ? lol.. - by [HiC]TheKiller - 27.09.2010, 22:16
Re: married couples ? lol.. - by Rocky Balboa - 28.09.2010, 01:29
Re: married couples ? lol.. - by Rocky Balboa - 28.09.2010, 01:32
Re: married couples ? lol.. - by Steven82 - 28.09.2010, 03:07

Forum Jump:


Users browsing this thread: 1 Guest(s)