PHP код:
if(strcmp(cmd, "/robbank", true) == 0 || strcmp(cmd,"/braquagebanque",true)==0)
{
new success = random(2);
if(BankRobbedRecently == 1)
{
SendClientMessage(playerid, COLOR_GREY, "* Cet endroit a dйjа йtй cambriolй, rйessayez plus tard");
return 1;
}
if(PlayerInfo[playerid][pRobTime] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "* Vous avez dйjа cambriolй un endroit rйcemment, patientez.");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2, 2309.6060,-4.0211,26.7422) || IsPlayerInRangeOfPoint(playerid, 2, 1154.7281,-1427.2115,15.7969)|| IsPlayerInRangeOfPoint(playerid, 2, 375.5051,167.5345,1008.3828))
{
if(GetPlayerWeapon(playerid) >= 24 && GetPlayerWeapon(playerid) <= 40)
{
if(PlayerInfo[playerid][pDuty] == 0)
{
if(success == 1)
{
SendClientMessage(playerid, COLOR_ORANGE, "* Vous cambriolez la banque, restez sur les lieux pendant 95 Secondes!");
RobbingTime[playerid] = 95;
RobBankTimer = SetTimerEx("RobBank",1000,true,"i",playerid);
WantedPoints[playerid] = 5;
SetPlayerCriminal(playerid,255, "Cambriolage de la banque");
PlayerInfo[playerid][pRobTime] = 900;
BankRobbedRecently = 1;
SetTimer("UnsetBankRob",1500000,false);
OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "* Braquage ratй!");
WantedPoints[playerid] = 2;
SetPlayerCriminal(playerid,255, "Tentative de cambriolage");
PlayerInfo[playerid][pRobTime] = 500;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* Quittez votre service en premier!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* Il vous faut une arme pour faire зa!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* Vous n'кtes pas а la banque!");
return 1;
}
return 1;
}