27.04.2016, 09:18
Try this and let me know, please:
You used "return 1;" in multiple open places, making the last one un-reachable.
Also, please can you state the warning(s) you are getting from the last part? Is it the loose indentation?
EDIT:
If it is loose indentation, here is an attempted fix:
pawn Код:
}
else
{
PlayerInfo[RefillOffer[playerid]][pMechSkill] += 1;
PlayerInfo[RefillOffer[playerid]][pXP] += PlayerInfo[RefillOffer[playerid]][pLevel] * XP_RATE;
}
if(RefillPrice[playerid] >= 30000 && (PlayerInfo[playerid][pLevel] <= 3 || PlayerInfo[RefillOffer[playerid]][pLevel] <= 3)) {
format(szMessage, sizeof(szMessage), "%s (IP:%s) has refueled %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RefillOffer[playerid]), ipex, RefillPrice[playerid]);
//Log("logs/pay.log", szMessage);
ABroadCast(COLOR_YELLOW, szMessage, 2);
}
RefillOffer[playerid] = INVALID_PLAYER_ID;
RefillPrice[playerid] = 0;
}
}
}
else {
SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the refill!");
return 1;
}
}
else {
SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you to refill your Car!");
return 1;
}
}
else { return 1; }
}
return 1;
}
Also, please can you state the warning(s) you are getting from the last part? Is it the loose indentation?
EDIT:
If it is loose indentation, here is an attempted fix:
pawn Код:
if(strcmp(params, "death", true) == 0) {
if(GetPVarInt(playerid, "Injured") == 1) {
for(new i; i < MAX_PLAYERS; i++) { // GetPlayerPool() or foreach is highly recommended!
if(IsAMedic(i))
return SendClientMessage(playerid, COLOR_GREY, "There are FD Members Online!, (/service ems)");
break;
}
}
SendClientMessageEx(playerid, COLOR_WHITE, "You gave up hope and fell unconscious, you were immediately sent to the hospital.");
KillEMSQueue(playerid);
ResetPlayerWeaponsEx(playerid);
SpawnPlayer(playerid);
}
else { SendClientMessageEx(playerid, COLOR_GREY, " You are not injured, you can't do this right now !"); }
}