#define CP_Lotto 45
Variable (all robbery's have cordinates here idk what they are for but ive putted here the same as in the checkpoints)
new Float:checkCoords[MAX_POINTS][4] = {
{822.4184,2.8957,1004.1797,89.0812} //Lotto
};
(something that comes next is where i puted same cordinates as b4 too but all cordinates from other robbery's are different idk why!!!)
new Float:checkpoints[MAX_POINTS][4] = {
{822.4184,2.8957,1004.1797,89.0812} //Lotto
};
new checkpointType[MAX_POINTS] = {
CP_Lotto
new RobbingLotto[MAX_PLAYERS];
new LottoRobbedRecently =0;
(idk whats this next thing but it says in comments "Reset Death variables")
RobbingLotto[playerid] =0;
(next is something that is in the /robstore command(lotto is last one)
if(getCheckpointType(playerid) != CP_BurgerShotMain && getCheckpointType(playerid) != CP_CluckinBellMain &&
getCheckpointType(playerid) != CP_Ammunation && getCheckpointType(playerid) != CP_GayDarMain &&
getCheckpointType(playerid) != CP_ZeroMain && getCheckpointType(playerid) != CP_MistysMain &&
getCheckpointType(playerid) != CP_GYM && getCheckpointType(playerid) != CP_School &&
getCheckpointType(playerid) != CP_WangCars && getCheckpointType(playerid) != CP_Train &&
getCheckpointType(playerid) != CP_Barbers && getCheckpointType(playerid) != CP_PizzaMain &&
getCheckpointType(playerid) != CP_ZipMain && getCheckpointType(playerid) != CP_VictimMain &&
getCheckpointType(playerid) != CP_BincoMain && getCheckpointType(playerid) != CP_CityHallMain &&
getCheckpointType(playerid) != CP_Jizzys && getCheckpointType(playerid) != CP_Urban &&
getCheckpointType(playerid) != CP_Lotto)
(idk what this is but i guess its just messages for callbacks? idk)
if(getCheckpointType(playerid) == CP_Lotto)
{
if(LottoRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Lotto has been robbed recently.");
return 1;
}
if(rrand <= 30)
{
SendClientMessage(playerid,COLOR_ERROR,"The Lotto robbery failed.");
LottoRobbedRecently =320;
return 1;
}
LottoRobbedRecently =320;
RobbingLotto[playerid] =25;
IncreaseWantedLevel(playerid,4);
IncreasePlayerScore(playerid,1);
SetProgressBarValue(robbery[playerid],RobbingLotto[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbi ng Lotto.~n~~r~Finish Robbery in: %d seconds.",RobbingLotto[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Lotto! Get there and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Lotto ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Lotto ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
(next is when we enter checkpoint i guess)
if(getCheckpointType(playerid) == CP_Lotto)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_ERROR,"You must exit your vehicle before entering a checkpoint.");
return 1;
}
SendClientMessage(playerid,COLOR_ERROR,"Type /robstore to rob the Lotto.");
return 1;
}
(this is what appears when u leave the checkpoint during robbery i guess)
if(getCheckpointType(playerid) == CP_Lotto)
{
if(RobbingLotto[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Lotto attempt failed. You left the checkpoint ..");
GameTextForPlayer(playerid,"~r~Lotto robbery attempt failed..",3000,5);
RobbingLotto[playerid] =0;
return 1;
}
return 1;
}
(i defintly dont know what this next is...)
//Lotto robbed recently
if(LottoRobbedRecently >= 1)
{
LottoRobbedRecently --;
}
(i think this is the robbery stuff...)
if(RobbingLotto[i] > 1)
{
RobbingLotto[i] --;
SetProgressBarValue(robbery[i],RobbingLotto[i]);
ShowProgressBarForPlayer(i, robbery[i]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbi ng Lotto.~n~~r~Finish Robbery in: %d seconds.",RobbingLotto[i]);
GameTextForPlayer(i,string,3000,3);
}
if(RobbingLotto[i] == 1)
{
new mrand =random(30000);
RobbingLotto[i] =0;
format(string,sizeof(string),"Lotto Robbery Complete.\nYou robbed a total of $%d from Lotto.\nWatch out for police!",mrand);
SendClientMessage(i,COLOR_RED,string);
GivePlayerMoney(i,mrand);
if(RobSkill[i] < 20)
{
SendClientMessage(i,COLOR_LIGHTBLUE,"Your robbing skill has increased. You can check /robskill to see your skill level and see what you can rob next.");
RobSkill[i] ++;
}
format(string,sizeof(string),"[POLICE RADIO] Robbery: Suspect %s(%d) has robbed a total of $%d from the Lotto! Go and arrest the suspect.",pname,i,mrand);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has robbed a total of $%d from Lotto! Clothes prices have rocketed! ..",pname,i,mrand);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has robbed a total of $%d from Lotto! Clothes prices have rocketed! ..",pname,i,mrand);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
}
public ResetVariables(playerid)
{
RobbingLotto[playerid] =0;
And thats all guys plz help me