small problem
#1

When i do /levelinfo it only shows what i get in level 6 and 7. can you guys help
pawn Код:
CMD:levelinfo(playerid,params[])
{
    SendClientMessage(playerid,orange,"Level 1: Nothing, Level 2: $10000, /robbank and katana, Level 3: $25000 and 9mm pistol, Level 4: $50000 and deagle, Level 5: $100000 and micro smg");
    SendClientMessage(playerid,orange,"Level 6: $175000 and Ak-47, Level 7: $250000 and sawn-off-shotgun");
    return 1;
}
Reply
#2

pawn Код:
CMD:levelinfo(playerid,params[])
{
    SendClientMessage(playerid,orange,"Level 1: Nothing, Level 2: $10000, /robbank and katana, Level 3: $25000 and 9mm pistol, Level 4: $50000 and deagle, Level 5: $100000 and micro smg, Level 6: $175000 and Ak-47, Level 7: $250000 and sawn-off-shotgun");
    return 1;
}
Reply
#3

pawn Код:
CMD:levelinfo(playerid,params[])
{
if(GetPlayerScore(playerid) >= 7)
{
SendClientMessage(playerid, COLOR_RED, "blah blah blah");
}
else if(GetPlayerScore(playerid) >= 10)
{
SendClientMessage(playerid, COLOR_RED, "blah blah blah");  
}  
return 1;
}
NOTE: This is just for score, not your level system, You can take this basic to help you to script it, cause i don't have your level system info so :P hope it helped you.
Reply
#4

Not sure if you need something like this but here's a very easy way:
pawn Код:
static const
    g_aLevelInfo[][] =
    {
        { "Level 1: Nothing, Level 2: $10000, /robbank and katana, Level 3: $25000 and 9mm pistol, Level 4: $50000 and deagle, Level 5: $100000 and micro smg" },
        { "Level 2: X" },
        { "Level 3: X" },
        { "Level 4: X" },
        { "Level 5: X" },
        { "Level 6: $175000 and Ak-47, Level 7: $250000 and sawn-off-shotgun" }
        // ...
    }
;
pawn Код:
CMD:levelinfo(playerid, params[])
    return SendClientMessage(playerid, orange, g_aLevelInfo[playerLevel - 1]);
Just replace "playerLevel" with your variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)