12.07.2010, 14:31
(
Последний раз редактировалось willsuckformoney; 12.07.2010 в 14:59.
)
moo! i need some help making this so that you can do
/HBet [1 - 3]
And it Picks Horse 1 Horse 2 Horse 3
each takes different values of cash
But i need to get it so that there is a timer so when you pick your horse you wait the timer limit (1 minute)
and make it so you can win and lose here is the whole script basically not really big
I think im somewhere near right but dont think i am either
/HBet [1 - 3]
And it Picks Horse 1 Horse 2 Horse 3
each takes different values of cash
But i need to get it so that there is a timer so when you pick your horse you wait the timer limit (1 minute)
and make it so you can win and lose here is the whole script basically not really big
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define COLOR_PINK 0xFF66FFAA
#define COLOR_GREEN 0x18FF18FF
#define COLOR_BLUE 0x0000FFFF
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Horse Bets by WillsuckformoneY");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmd,"/HBet",true)){
if(!strlen(tmp)||strval(tmp)<0||strval(tmp)>3) return SendClientMessage(playerid,COLOR_PINK,"FAIL! Do /Bet [1 - 3]");
switch(strval(tmp))
{
case 1:
{
SendClientMessage(playerid, COLOR_BLUE, "You Selected Horse 1");
SetPlayerMoney(playerid, -100);
SetTimer("BETS", 60000, true);
SendClientMessage(playerid, COLOR_PINK, "Congratulations, You won $200 From your Horse Bet");
SetPlayerMoney(playerid, +200);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Sorry! You did NOT win From your Horse Bet, Better luck next time!!");
}
case 2:
{
SendClientMessage(playerid, COLOR_BLUE, "You Selected Horse 2");
SetPlayerMoney(playerid, -200);
SetTimer("BETS", 60000, true);
SendClientMessage(playerid, COLOR_PINK, "Congratulations, You won $400 From your Horse Bet");
SetPlayerMoney(playerid, +400);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Sorry! You did NOT win From your Horse Bet, Better luck next time!!");
}
case 3:
{
SendClientMessage(playerid, COLOR_BLUE, "You Selected Horse 3");
SetPlayerMoney(playerid, -300);
SetTimer("BETS", 60000, true);
SendClientMessage(playerid, COLOR_PINK, "Congratulations, You won $600 From your Horse Bet");
SetPlayerMoney(playerid, +600);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Sorry! You did NOT win From your Horse Bet, Better luck next time!!");
}
}
return 1;
}
return 0;
}