How to make random?
#4

Quote:
Originally Posted by Larceny
Посмотреть сообщение
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_CROUCH)
    {
	SendClientMessage(playerid,0xFFFFFFFF, "WORKING");
	new randomid = random(500);//500=number of players
	TogglePlayerControllable(randomid, false);
	SendClientMessage(randomid,0xFFFFFFFF, "You've been freezed by someone.");
    }
    return 1;
}
He wouldn't be able to use this. It would only work if all 500 player slots were filled.

Not quite sure how you could do this. I'm sure a more experienced Pawn Programmer will know how to do this properly.
Reply


Messages In This Thread
How to make random? - by Ben7544 - 13.04.2011, 23:50
Re: How to make random? - by DarrenReeder - 14.04.2011, 00:06
Re: How to make random? - by Shelby - 14.04.2011, 00:07
Re: How to make random? - by DarrenReeder - 14.04.2011, 00:12
Re: How to make random? - by Shelby - 14.04.2011, 00:23
Re: How to make random? - by Ben7544 - 14.04.2011, 09:33
Re: How to make random? - by Mean - 14.04.2011, 09:55
Re: How to make random? - by Shelby - 14.04.2011, 10:33

Forum Jump:


Users browsing this thread: 1 Guest(s)