08.09.2014, 14:58
The whole "magic" is the "random" function.
pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid)
{
if(somepickup == pickupid)
{
switch(random(2)) // random(2) can produce either the number 0 or 1
{
case 0: SendClientMessage(playerid,0xFF0000FF,"Sorry, the heart is bad");
case 1: SendClientMessage(playerid,0x00FF00FF,"Yeee this heart is cool and all");
}
}
}