Robbery Countdown - 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)
+--- Thread: Robbery Countdown (
/showthread.php?tid=487815)
Robbery Countdown -
rakshith122 - 15.01.2014
Well Hi,
I'm using the SFCRRPG gamemode. When robbing a store, It displays the countdown(seconds) in a dialog with some text, I need to change it as a text draw countdown. The counting should be like a textdraw. Nevermind if its on bottom/top/middle. If you didn't understand what I said, Just give a reply and I'll try explaining more briefly..
Hope someone would help me,
Thanks.
Re: Robbery Countdown -
Omar55555 - 15.01.2014
pawn Код:
forward CountDown();
public CountDown()
{
new str[32];
if(CountDownTimes > 1)
{
CountDownTimes --;
format(str, sizeof(str), "~b~Count Down: ~r~%d", CountDownTimes);
GameTextForAll(str, 1000, 6);
SetTimer("CountDown",1000,0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 5201, 0.0, 0.0, 0.0);
}
}
else if(CountDownTimes <= 1)
{
CountDownTimes = 0;
format(str, sizeof(str), "~y~GO!");
GameTextForAll(str, 1000, 6);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
}
}
return 1;
that is 6 countdowns i made try it and tell me
pawn Код:
if(strcmp(cmdtext, "/countdown", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1) return 0;
if(CountDownTimes != 0) return SendErrorMessage(playerid,"A countdown in progress!");
CountDownTimes = 6;
SetTimer("CountDown",500,0);
return 1;
}
EDIT

h sorry i thought normal countdown not robbery countdown this is normal sorry.
Re: Robbery Countdown -
rakshith122 - 15.01.2014
Nope..
Take a look at this..
pawn Код:
if(getCheckpointType(playerid) == CP_BincoMain)
{
if(zones[current_zone][zone_name] == zones[161][zone_name])
{
if(JHBincoRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Juniper Hill Binco has been robbed recently.");
return 1;
}
if(rrand <= 30)
{
SendClientMessage(playerid,COLOR_ERROR,"Juniper Hill Binco robbery failed.");
JHBincoRobbedRecently =320;
return 1;
}
JHBincoRobbedRecently =320;
RobbingJHBinco[playerid] =25;
IncreaseWantedLevel(playerid,4);
IncreasePlayerScore(playerid,1);
FROM HERE format(string,sizeof(string),"Robbing Binco.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingJHBinco[playerid]);
ShowPlayerDialog(playerid,DIALOG_BINCO,DIALOG_STYLE_MSGBOX,"{FF0000}Binco Robbery",string,"Ok","Cancel"); TO HERE
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Juniper Hill Binco! Get To Binco and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Binco ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Binco ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
return 1;
}
Its a code for robbing BINCO, JUNIPER HOLLOW.
I need to make that dialog thing as a textdraw.
Re: Robbery Countdown -
rakshith122 - 15.01.2014
Bump!