new Float:checkCoords[MAX_POINTS][4] = {
{293.0301,-38.5132,294.7196,-37.0548}, //Ammunation
new Float:checkpoints[MAX_POINTS][4] = {
{293.6689,-37.6174,1001.5156,3.0}, //Ammunation
if(getCheckpointType(playerid) == CP_Ammunation)
{
if(zones[current_zone][zone_name] == zones[241][zone_name] || zones[current_zone][zone_name] == zones[242][zone_name] ||
zones[current_zone][zone_name] == zones[243][zone_name])
{
if(AmmunationRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Ammunation has been robbed recently.");
return 1;
}
if(RobSkill[playerid] < 20)
{
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 20 to rob Ammunation. Check /robskill to see what you can rob.");
return 1;
}
AmmunationRobbedRecently =320;
RobbingAmmunation[playerid] =25;
IncreaseWantedLevel(playerid,4);
IncreasePlayerScore(playerid,1);
format(string,sizeof(string),"~w~Robbing Ammunation.~n~~r~Finish Robbery in: %d seconds.~n~~b~Police are on the way.",RobbingAmmunation[playerid]);
GameTextForPlayer(playerid, string, 3000, 3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Ammunation! Get To Ammunation and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Ammunation ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Ammunation ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
return 1;
I dont see a checkpoint setter anywhere in the code. Here are the parameters:
https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint |
public checkpointUpdate()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
for(new j=0; j < MAX_POINTS; j++)
{
if(isPlayerInArea(i, checkCoords[j]))
{
if(playerCheckpoint[i]!=j)
{
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]);
playerCheckpoint[i] = j;
}
}
else
{
if(playerCheckpoint[i]==j)
{
DisablePlayerCheckpoint(i);
playerCheckpoint[i] = 999;
}
}
}
}
}
}
Well personally at this point what I'd try doing is printing a buncb of variables and figure out where it's ending and if it's even respond to your if statement (debugging). print("1"); and then just order the different numbers so you can trace where in the scriot that is breaking. That if statement to me with the checkcoords looks wrong, never really seen an array be done like that.
|