28.12.2017, 13:32
PHP код:
CMD:dice(playerid)
{
if(GetPlayerMoney(playerid) < 1000000) return SendClientMessage(playerid , 0x0000FFFF, "You Dont Have Enough Money.");
new Dice;
Dice = random(7);
new lose;
lose = random(6);
if(Dice == 1)
{
SendClientMessage(playerid, -1, "The dice number 1");
}
if(Dice == 2)
{
SendClientMessage(playerid, -1, "The dice number 2");
GivePlayerMoney(playerid,50000);
}
if(Dice == 3)
{
SendClientMessage(playerid, -1, "The dice number 3");
GivePlayerMoney(playerid,50000);
}
if(Dice == 4)
{
GivePlayerMoney(playerid,50000);
SendClientMessage(playerid, -1, "The dice number 4");
}
if(Dice == 5)
{
GivePlayerMoney(playerid,50000);
SendClientMessage(playerid, -1, "The dice number 5");
}
if(Dice == 6)
{
GivePlayerMoney(playerid,50000);
SendClientMessage(playerid, -1, "The dice number 6 and you wins 1000000 money!");
GivePlayerMoney(playerid, 1000000);
}
if(lose == 1)
{
SendClientMessage(playerid, -1, "But Your Money Have Been reseted.");
ResetPlayerMoney(playerid);
}
if(lose == 5)
{
SendClientMessage(playerid, -1, "But Your Money Have Been reseted.");
ResetPlayerMoney(playerid);
}
return 1;
}