28.11.2013, 16:00
Hello guys,
So i have a rank system using the player's score, but when i use GetPlayerScore to get the score(rank) to check if the player has a high enough rank (score) to be a class it wont work correctly. (i get no compiling errors)
example:
When my score is 0, it still says that i am not a high enough level but it does tell me that i spawned as a 'basic' survivor.
I think the problem is with the >= (higher or equal). Anyways help?
So i have a rank system using the player's score, but when i use GetPlayerScore to get the score(rank) to check if the player has a high enough rank (score) to be a class it wont work correctly. (i get no compiling errors)
example:
pawn Код:
if(dialogid == 9)
{
if(response)
{
if(GetPlayerScore(playerid) >= 0)
{
if(listitem == 0)
{
SendClientMessage(playerid, -1, ""chat" "COL_ORANGE"You spawned as a 'Basic' Survivor!");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
SetPlayerColor(playerid, 0x00DDFF00);
GivePlayerWeapon(playerid, 22, 99999999999);
GivePlayerWeapon(playerid, 25, 100);
SetPlayerSkin(playerid, 299);
SetPlayerTeam(playerid, SURVIVORS);
}
//rest of my getscores / classes
}
else
{
ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Survivor Classes", ""BASIC"Basic Survivor(Rank 0)\n"SURVIVOR"Survivor(Rank 5)\n"ADVANCED"Advanced Survivor(Rank 20)\n"MASTER"Master Survivor(Rank 40)", "Select", "");
SendClientMessage(playerid, -1, ""chat" "COL_RED"You do not have enough score to be this class!");
}
I think the problem is with the >= (higher or equal). Anyways help?