Quote:
Originally Posted by dusk
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"); } } }
|
Your ideea is good ,but if i enter the heart once it's saying Yee this ... etc etc. , if i enter again it will say Sorry, the heart is bad, i want for playerid to be not good , so if u understand what i mean , If i am connected to server and my id is 39 , the Heart 1 is bad forever for me ( id 31) , but for another playerid is everytime good.