04.04.2011, 15:02
I have this cmd :
When i make /gamble, then i win only desert . How i can make that, like i can win something else too ? And i want to make that, like if you use /gamble, then you need to wait 30 secs to gamble again, how to make that !
pawn Код:
new gamble;
pawn Код:
COMMAND:gamble(playerid,params[])
{
switch(gamble)
{
case 0:
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
new string[256];
format(string, sizeof(string), "You have win Deagle with 33 ammo !");
SendClientMessage(playerid, COLOR_GREEN,string);
format(string, sizeof(string), "{FF0066}[Lucky Gamble^^]%s have win Deagle with 33 ammo !",PlayerName);
SendClientMessage(playerid, COLOR_GREEN,string);
GivePlayerWeapon(playerid, 24, 33);
//SetTimer("NeedToWait",30000,true);
}
case 1:
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
new string[256];
format(string, sizeof(string), "You have win Sniper with 147 ammo !");
SendClientMessage(playerid, COLOR_GREEN,string);
format(string, sizeof(string), "{FF0066}[Lucky Gamble^^]%s have win Sniper with 147 ammo !",PlayerName);
SendClientMessage(playerid, COLOR_GREEN,string);
GivePlayerWeapon(playerid, 34, 147);
//SetTimer("NeedToWait",30000,true);
}
case 2:
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
new string[256];
format(string, sizeof(string), "You have lose 10 000$ !");
SendClientMessage(playerid, COLOR_GREEN,string);
format(string, sizeof(string), "{FF0000}[UnLucky Gamble O.o]%s have lose 10 000$ !",PlayerName);
SendClientMessage(playerid, COLOR_GREEN,string);
GivePlayerMoney(playerid, -10000);
//SetTimer("NeedToWait",30000,true);
}
}
return gamble;
}