07.08.2010, 20:35
Im making just a "simple" level system, using score as the exp (normal on rpg games, but on my case, ain't an rpg). The problem is how to define "new level;", through the amount of scores, such as I did a command which replies an level according with your amount of scores :
But , in otherwise, I'd like to use so : (for a vehicle)
~> It'd help my so much in future things (lol) ; Thank you.
Код:
if(strcmp("/level",cmdtext, true, 10) == 0) { if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 9) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 0"); } else if(GetPlayerScore(playerid) >= 10 && GetPlayerScore(playerid) <= 19) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 1"); } else if(GetPlayerScore(playerid) >= 20 && GetPlayerScore(playerid) <= 29) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 2"); } else if(GetPlayerScore(playerid) >= 30 && GetPlayerScore(playerid) <= 39) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 3"); return 1; } else if(GetPlayerScore(playerid) >= 40 && GetPlayerScore(playerid) <= 49) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 4"); return 1; } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) <= 59) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 5"); return 1; } else if(GetPlayerScore(playerid) >= 60 && GetPlayerScore(playerid) <= 69) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 6"); return 1; } else if(GetPlayerScore(playerid) >= 70 && GetPlayerScore(playerid) <= 79) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 7"); return 1; } else if(GetPlayerScore(playerid) >= 80 && GetPlayerScore(playerid) <= 89) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 8"); return 1; } else if(GetPlayerScore(playerid) >= 90 && GetPlayerScore(playerid) <= 99) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 9"); return 1; } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 109) { return SendClientMessage(playerid, COR_BRANCO, "Seu level й 10"); return 1; }
Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 432) { if(level[playerid]=10) { } else { return false; } return 1; }