if(text[0] == '2' && AMMUBOX[playerid] == 1)
{
if(CPS_IsPlayerInCheckpoint(playerid, cpammu))
{
AMMUBOX[playerid] = 0;
if(gTeam[playerid] != COP && gTeam[playerid] != Medic && gTeam[playerid] != SWAT && gTeam[playerid] != FBI && gTeam[playerid] != ARMY)
{
if(AmmuRecentlyRobbed == 0)
{
new chances = random(500);
if(chances >= 0 && chances <= 400)
{
new string[250];
RobAmmu[playerid] = 20;
AmmuRecentlyRobbed = 150;
format(string, sizeof(string), "%s[ID:%d] started a robbery at Ammunation!", name, playerid);
Announce(string);
return true;
}
else if(chances >= 401 && chances <= 500)
{
new copmsg[250];
SendClientMessage(playerid, ERROR, "Your attempt to rob Ammunation failed!");
SendClientMessage(playerid, ERROR, "The Police are on their way to the store.");
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+ 5);
format(copmsg, sizeof(copmsg), "[HQ] %s attemped to rob Ammunation.", name);
SendRadioMessageToCops(copmsg);
AmmuRecentlyRobbed = 100;
return true;
}
}
else if(AmmuRecentlyRobbed > 0) return SendClientMessage(playerid, ERROR, "Ammunation has been robbed recently!");
}
else SendClientMessage(playerid, ERROR, "Your team cannot rob anything.");
}
if(CPS_IsPlayerInCheckpoint(playerid, cpammu2))
{
AMMUBOX[playerid] = 0;
if(gTeam[playerid] != COP && gTeam[playerid] != Medic && gTeam[playerid] != SWAT && gTeam[playerid] != FBI && gTeam[playerid] != ARMY)
{
if(Ammu2RecentlyRobbed == 0)
{
new chances = random(500);
if(chances >= 0 && chances <= 400)
{
new string[250];
RobAmmu2[playerid] = 20;
Ammu2RecentlyRobbed = 150;
format(string, sizeof(string), "%s[ID:%d] started a robbery at Ammunation!", name, playerid);
Announce(string);
return true;
}
else if(chances >= 401 && chances <= 500)
{
new copmsg[250];
SendClientMessage(playerid, ERROR, "Your attempt to rob Ammunation failed!");
SendClientMessage(playerid, ERROR, "The Police are on their way to the store.");
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+ 5);
format(copmsg, sizeof(copmsg), "[HQ] %s attemped to rob Ammunation.", name);
SendRadioMessageToCops(copmsg);
Ammu2RecentlyRobbed = 100;
return true;
}
}
else if(Ammu2RecentlyRobbed > 0) return SendClientMessage(playerid, ERROR, "Ammunation has been robbed recently!");
}
else SendClientMessage(playerid, ERROR, "Your team cannot rob anything.");
}
if(CPS_IsPlayerInCheckpoint(playerid, cpammu3))
{
AMMUBOX[playerid] = 0;
if(gTeam[playerid] != COP && gTeam[playerid] != Medic && gTeam[playerid] != SWAT && gTeam[playerid] != FBI && gTeam[playerid] != ARMY)
{
if(Ammu3RecentlyRobbed == 0)
{
new chances = random(500);
if(chances >= 0 && chances <= 400)
{
new string[250];
RobAmmu3[playerid] = 20;
Ammu3RecentlyRobbed = 150;
format(string, sizeof(string), "%s[ID:%d] started a robbery at Ammunation!", name, playerid);
Announce(string);
return true;
}
else if(chances >= 401 && chances <= 500)
{
new copmsg[250];
SendClientMessage(playerid, ERROR, "Your attempt to rob Ammunation failed!");
SendClientMessage(playerid, ERROR, "The Police are on their way to the store.");
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+ 5);
format(copmsg, sizeof(copmsg), "[HQ] %s attemped to rob Ammunation.", name);
SendRadioMessageToCops(copmsg);
Ammu3RecentlyRobbed = 100;
return true;
}
}
else if(Ammu3RecentlyRobbed > 0) return SendClientMessage(playerid, ERROR, "Ammunation has been robbed recently!");
}
else SendClientMessage(playerid, ERROR, "Your team cannot rob anything.");
}
if(CPS_IsPlayerInCheckpoint(playerid, cpammu4))
{
AMMUBOX[playerid] = 0;
if(gTeam[playerid] != COP && gTeam[playerid] != Medic && gTeam[playerid] != SWAT && gTeam[playerid] != FBI && gTeam[playerid] != ARMY)
{
if(Ammu4RecentlyRobbed == 0)
{
new chances = random(500);
if(chances >= 0 && chances <= 400)
{
new string[250];
RobAmmu4[playerid] = 20;
Ammu4RecentlyRobbed = 150;
format(string, sizeof(string), "%s[ID:%d] started a robbery at Ammunation!", name, playerid);
Announce(string);
return true;
}
else if(chances >= 401 && chances <= 500)
{
new copmsg[250];
SendClientMessage(playerid, ERROR, "Your attempt to rob Ammunation failed!");
SendClientMessage(playerid, ERROR, "The Police are on their way to the store.");
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+ 5);
format(copmsg, sizeof(copmsg), "[HQ] %s attemped to rob Ammunation.", name);
SendRadioMessageToCops(copmsg);
Ammu4RecentlyRobbed = 100;
return true;
}
}
else if(Ammu4RecentlyRobbed > 0) return SendClientMessage(playerid, ERROR, "Ammunation has been robbed recently!");
}
else SendClientMessage(playerid, ERROR, "Your team cannot rob anything.");
}
if(CPS_IsPlayerInCheckpoint(playerid, cpammu5))
{
AMMUBOX[playerid] = 0;
if(gTeam[playerid] != COP && gTeam[playerid] != Medic && gTeam[playerid] != SWAT && gTeam[playerid] != FBI && gTeam[playerid] != ARMY)
{
if(Ammu5RecentlyRobbed == 0)
{
new chances = random(500);
if(chances >= 0 && chances <= 400)
{
new string[250];
RobAmmu5[playerid] = 20;
Ammu5RecentlyRobbed = 150;
format(string, sizeof(string), "%s[ID:%d] started a robbery at Ammunation!", name, playerid);
Announce(string);
return true;
}
else if(chances >= 401 && chances <= 500)
{
new copmsg[250];
SendClientMessage(playerid, ERROR, "Your attempt to rob Ammunation failed!");
SendClientMessage(playerid, ERROR, "The Police are on their way to the store.");
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+ 5);
format(copmsg, sizeof(copmsg), "[HQ] %s attemped to rob Ammunation.", name);
SendRadioMessageToCops(copmsg);
Ammu5RecentlyRobbed = 100;
return true;
}
}
else if(Ammu5RecentlyRobbed > 0) return SendClientMessage(playerid, ERROR, "Ammunation has been robbed recently!");
}
else SendClientMessage(playerid, ERROR, "Your team cannot rob anything.");
}
return false;
}
There can be many things causing the problem.
Seeing as you haven't even tried de-bugging by commenting out portions of your script, what makes you so important? No one cares if you need it ASAP. Now please, quit being selfish, and follow the rules. |
Originally Posted by SA-MP Team
First and foremost, the main forum rules still apply here. You may only bump your thread after 48 hours has passed since the last reply. If you do not get help, please re-evaluate the explanation of the issue you provided, it may not be providing enough information for people to help you. f you are unsure or don't know how to proceed with solving an issue, then do not respond to the thread, it will be considered spam. Use a proper thread title, it should sum up the general problem you're having in a few words. (For example, do not use silly babble like "HELP PLS HELP PLS REP+++", use "Issue with SetPlayerPos and interiors") You should always be providing code! People cannot help you if they cannot see what's wrong with the code. If you are requesting a script, post in the Script Request Thread Do not post untested code. |
So, are you planning on providing help, or just Posthunting?
|
People like you make me sick, pointing out how someone breaks the rules, when you, yourself, are posthunting.
|
He just dont understand it Devil xD! Wont quit blabering.
Registration Date state's the Date when i joined SA-MP Forum brother not when i started Scripting. Why are you making it too hard? Do you never apologize or you dont like to? Its not that hard brother. Just try once! I guess you dont like to follow the rules.? |