PLZ HELP ME
#1

I got this command like /flipcoin
Pawno
if(strcmp(cmdtext, "/flipcoin", true) == 0) // By Keondre Harris
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "%s flips a quarter and it lands on heads");
SendClientMessage(playerid, COLOR_GREEN, "%s flips a quarter and it lands on tails");
return 1;
}

how do i make it randomly so it have a chance of landing on heads or talis and only the people around get da message to on wat it landed on...
Reply
#2

Код:
if(!strcmp(cmdtext,"/flipcoin",true))
{
	new ran = random(2);
	new flipmsg[64],lname[MAX_PLAYER_NAME];
	GetPlayerName(playerid,lname,sizeof lname);
	switch(ran)
	{
		case 1:format(flipmsg,sizeof flipmsg,"%s flips a quarter and it lands on heads",lname);
		default:format(flipmsg,sizeof flipmsg,"%s flips a quarter and it lands on tails",lname);	
	}
	return SendClientMessage(playerid,0x00FF00FF,flipmsg);
}
Reply
#3

THANKS BRO
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)