PLZ HELP ME - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PLZ HELP ME (
/showthread.php?tid=127100)
PLZ HELP ME -
Keeboo13 - 11.02.2010
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...
Re: PLZ HELP ME -
BlackFoX - 11.02.2010
Код:
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);
}
Re: PLZ HELP ME -
Keeboo13 - 11.02.2010
THANKS BRO