if(!strcmp(cmdtext, "/transfercash", true))
{
if(PlayerToPoint(5, playerid, 364.5175,173.8485,1008.3893))
{
SendClientMessageToAll(ADMIN_RED, "[ ! ] BIP ! BIP ! BIP ! BIP ! Casino alarm launched ");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] Shit ! alarm is launched, hurry up man ");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] .... Money transfer in progress .... ");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] .... Money transfer in progress .... ");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] .... Money transfer in progress .... ");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] .... Money transfer in progress .... ");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] Congratulations ! You got your money ");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] PCash info : +5000 PCash ");
GivePlayerPCash(playerid, 5000);
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] Now get the hell out of here, the job is done");
SendClientMessage(playerid, COLOR_YELLOW, "[ ! ] Perhaps cops will chase you, try to loose them");
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ ! ] You are not at the casino safe ");
}
return 1;
}
forward Random(min, max);
public Random(min, max)
{
new a = random(max - min) + min;
return a;
}
// then use this
GivePlayerMoney(playerid, Random(1000, 1000);
#define randomEx(%1,%2) \
((%1)+random((%2)-(%1)+1))
|
Originally Posted by yezizhu
pawn Код:
|
#define GiveMoney(%1,%2,%3)GivePlayerMoney(%1,((%2)+random((%3)-(%2)+1)))
clamp(minval,maxval);
clamp(2,10);
|
Originally Posted by yezizhu
My god, forgot this function.
Код:
clamp(minval,maxval); pawn Код:
|
|
Originally Posted by Takumi<West-Side>
Quote:
& GivePlayerPCash(playerid, ? |
#define randomEx(%1,%2) \
((%1)+random((%2)-(%1)+1))
GivePlayerPCash(playerid, randomEx(1000, 10000);