30.11.2013, 13:45
(
Последний раз редактировалось iFiras; 11.09.2014 в 03:11.
)
Deleted.
if(IsPlayerInDynamicCP(playerid,WangCarsRobberyCP))
{
if(WangCarsHasBeenRobbed >= 1) return SCM(playerid,COLOR_RED,"ERROR: This location has been robbed recently. Come back later");
ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 0, 0, 5000, 1); //---This doesn't work :@---
SetPlayerAttachedObject(playerid, 3, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
RobbingWangCars[playerid] =15;
SCM(playerid,COLOR_PINK,"ROBBERY: You are now robbing Wang car's, please wait until you've finished robbing.");
return 1;
}
//----------------Robbing Wang Cars----------------------------------------
if(RobbingWangCars[i] > 1) //When player is robbing
{
RobbingWang[i] --;
WangRobbedRecently =200;
SetProgressBarValue(barid, 15.0);
ShowProgressBarForPlayer(playerid, barid)
}
stock PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
new robbingtime[MAX_PLAYERS];
forward RobberyBar(playerid);
public RobberyBar(playerid)
{
robbingtime[playerid] ++;
SetProgressBarValue(MyRobberyBar, robbingtime[playerid]);
if(robbingtime == 15)
{
KillTimer(RobbingTime);
HideProgressBarForPlayer(playerid,MyRobberyBar);
HideProgressBarForPlayer(playerid,MyRobberyBar);
robbingtime[playerid] = 0;
}
return 1;
}
// Let's save few memory:
// global:
new robbingtime[MAX_PLAYERS char];
// OnPlayerConnect:
robbingtime{ playerid } = 0;
if(RobbingWangCars[i] > 1) //When player is robbing
{
RobbingWang[i] --;
WangRobbedRecently =200;
robbingtime{ playerid } = 0;
ShowProgressBarForPlayer(playerid, MyRobberyBar);
RobbingTime = SetTimerEx("RobberyBar",1000,true,"i",i);
}
forward RobberyBar(playerid);
public RobberyBar(playerid)
{
robbingtime{ playerid }++;
SetProgressBarValue(MyRobberyBar,robbingtime);
UpdateProgressBar(MyRobberyBar, playerid);
if(robbingtime{ playerid } == 15)
{
robbingtime{ playerid } = 0;
KillTimer(RobbingTime);
HideProgressBarForPlayer(playerid,MyRobberyBar);
}
}