SA-MP Forums Archive
small problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: small problem (/showthread.php?tid=277393)



small problem - Tanush123 - 17.08.2011

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;
}



Re: small problem - ElieJabbour - 17.08.2011

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;
}



Re : small problem - Naruto_Emilio - 17.08.2011

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.


Re: small problem - RyDeR` - 17.08.2011

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.