15.10.2010, 19:29
pawn Код:
new Float:percent;
//new percent; // Tried with both Float and this one...
percent = (playerStats[playerid][pGunSkill]/50)*100;
new Float:percent;
//new percent; // Tried with both Float and this one...
percent = (playerStats[playerid][pGunSkill]/50)*100;
CMD:skills(playerid, params[]){
if(playerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "[ERROR] - Please log in first!");
new string[60], level, Float:percent;
SendClientMessage(playerid, COLOR_YELLOW, "---------------[Skills]---------------");
//Gun Dealer
if(playerStats[playerid][pGunSkill] < 50){ level = 1; percent = (playerStats[playerid][pGunSkill]/50)*100; }
else if(playerStats[playerid][pGunSkill] > 50 && playerStats[playerid][pGunSkill] < 150){ level = 2; percent = (playerStats[playerid][pGunSkill]/150)*100; }
format(string, sizeof(string), " * Gun Dealer Level: %d -- %f %s Completed (%d)", level, percent, "%%", playerStats[playerid][pGunSkill]);
SendClientMessage(playerid, COLOR_WHITE, string);
// Gun Dealer
SendClientMessage(playerid, COLOR_YELLOW, "---------------[Skills]---------------");
return 1;
}
percent = (playerStats[playerid][pGunSkill])*2;
pawn Код:
|