You can store the potential clients in an array, and then use GetURandomInt and modulus to select a random one.
Spoiler
Code:
GetRndClient()
{
decl iClients[MaxClients];
new numClients;
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && !IsClientSourceTV(i))
{
iClients[numClients++] = i;
}
}
if (numClients)
{
return iClients[GetURandomInt() % numClients];
}
else
{
return -1; // no clients? let's not divide by zero. :)
}
}
so, you couldn't figure it out, huh? well, I made this up on the spot. it's completely untested (might not even compile), but i think it'll work.