[POMOC]Pljacka

Započeo m-a-r-k-o, Avgust 07, 2011, 13:58:19 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Mod koji koristim Raven's

Problem: Kad idem pljackat banku ili recimo vjecnicu ako smo dvoica kod cp-a jedan ode onda se drugom stalno djele pare dok se nemakne s cp-a i kad se makne onda mu iznad glave pise  "Napustio si CP"

Komande:

if(strcmp(cmd, "/robbank", true) == 0)
{
   new success = random(2);
   if(BankRobbedRecently == 1)
{
   SendClientMessage(playerid, COLOR_GREY, "* Ova lokacija je nedavno opljackana, pokusajte kasnije");
   return 1;
}
if(PlayerInfo[playerid][pRobTime] >= 1)
{
   SendClientMessage(playerid, COLOR_GREY, "* Nedavno ste pokusali ili uspjesno nesto opljackali, molimo sacekajte.");
   return 1;
}
   if(IsPlayerInRangeOfPoint(playerid, 2, 2309.6060,-4.0211,26.7422))
   {
       if(GetPlayerWeapon(playerid) >= 24 && GetPlayerWeapon(playerid) <= 40)
{
       if(PlayerInfo[playerid][pDuty] == 0)
{
       if(success == 1)
{
       SendClientMessage(playerid, COLOR_ORANGE, "* Sada pljackate Banku, ostanite u checkpointu 95 Sekundi!");
                   RobbingTime[playerid] = 95;
RobBankTimer = SetTimerEx("RobBank",1000,true,"i",playerid);
           WantedPoints[playerid] = 5;
           SetPlayerCriminal(playerid,255, "Pljacka Banke");
           PlayerInfo[playerid][pRobTime] = 900;
           BankRobbedRecently = 0;
SetTimer("UnsetBankRob",1500000,false);
OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
}
else
{
   SendClientMessage(playerid, COLOR_ORANGE, "* Niste uspijeli opljackati Banku!");
   WantedPoints[playerid] = 2;
           SetPlayerCriminal(playerid,255, "Pokusaj pljacke Banke");
PlayerInfo[playerid][pRobTime] = 500;
}
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "* Ne smijete biti na dužnosti!");
   return 1;
}
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "* Morate imati vatreno oruzje da bi pokusali nesto ovakvo!");
   return 1;
}
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "* Niste na mjestu pljacke!");
   return 1;
}
return 1;
}




public RobBank(playerid)
{
new string[128];
if(IsPlayerInRangeOfPoint(playerid, 2, 2309.6060,-4.0211,26.7422))
{
if(RobbingTime[playerid] > 0)
{
   RobbingTime[playerid] --;
   GameTextForPlayer(playerid, "~w~Ostani u ~r~Pickup-u ~w~do kraja!", 1000,4);
}
else
{
   RobbingTime[playerid] = 0;
   KillTimer(RobBankTimer);
new money = random(2000);
   SafeGivePlayerMoney(playerid, money);
format(string, sizeof(string),"~w~Opljackali ste ~g~$%d ~w~iz ~y~Banke!", money);
GameTextForPlayer(playerid, string, 6000, 4);
format(string, sizeof(string),"* Opljackali ste $%d iz Banke!",money);
SendClientMessage(playerid, COLOR_GREY, string);
WantedPoints[playerid] = 10;
SetPlayerCriminal(playerid,255, "Pljackanje Banke");
}
}
else
{
       GameTextForPlayer(playerid, "~w~Napustio si Checkpoint!", 1000,4);
       RobbingTime[playerid] = 0;
KillTimer(RobBankTimer);
}
}