SA-MP Forums Archive
Ranks - 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: Ranks (/showthread.php?tid=88870)



Ranks - Puzi - 29.07.2009

Hi

I just want to ask, would that be right?

Код:
new rank[MAX_PLAYERS];

if (killscore == 1){
rank[playerid] = 1;
SendClientMessage(playerid,COLOR_YELLOW, "You are now on Rank 1 - Newbie! = 1 kill.");
SendClientMessage(playerid,COLOR_YELLOW, "You need 4 more kills to achieve next rank!");

if (killscore = 5){
rank[playerid] = 2;
SendClientMessage(playerid,COLOR_YELLOW, "You are now on Rank 2 - Local Peasant = 5 kills! Well done!");
SendClientMessage(playerid,COLOR_YELLOW, "You need 15 more kills to achieve next rank!");
...and so on. Please help and tell me if its right

Thanks and regards
Puzi


Re: Ranks - pagie1111 - 29.07.2009

Код:
new Rank0[MAX_PLAYERS];
new Rank1[MAX_PLAYERS];

OnPlayerConnect
{
Rank0[playerid] = 0;
Rank1[playerid] = 0;
return 1;
}

OnPlayerDeath.....
{
if (killscore == 1){
Rank0[killerid] = 1;
SendClientMessage(killerid,COLOR_YELLOW, "You are now on Rank 0 - Newbie! = 1 kill.");
SendClientMessage(killerid,COLOR_YELLOW, "You need 4 more kills to achieve next rank!");

if (killscore = 5)
{
if(Rank0[killerid] == 1)
{
Rank1[killerid] = 1;
SendClientMessage(killerid,COLOR_YELLOW, "You are now on Rank 1 - Local Peasant = 5 kills! Well done!");
SendClientMessage(killerid,COLOR_YELLOW, "You need 15 more kills to achieve next rank!");
See if that works - im not too sure if it does....


Re: Ranks - Puzi - 29.07.2009

Unfortunately that does not work, Thanks for help although. I dont think that is completely right since there is no expression in that. That's what shows when I compile.


Re: Ranks - pagie1111 - 29.07.2009

hmmm okay, sorry it didnt work, good luck!


Re: Ranks - Puzi - 29.07.2009

Can anyone help please?


Re: Ranks - Puzi - 29.07.2009

Would that do? Sorry for DB if it applies...

Код:
native SetPlayerRank(playerid, rankID);
native GetPlayerRank(playerid);
new killscore

if (killscore == 1){
SetPlayerRank(playerid, 1);
SendClientMessage(playerid,COLOR_YELLOW, "You are now on Rank 1 - Newbie! = 1 kill.");
SendClientMessage(playerid,COLOR_YELLOW, "You need 4 more kills to achieve next rank!");

if (killscore = 5){
SetPlayerRank(playerid, 2);
SendClientMessage(playerid,COLOR_YELLOW, "You are now on Rank 2 - Local Peasant = 5 kills! Well done!");
SendClientMessage(playerid,COLOR_YELLOW, "You need 15 more kills to achieve next rank!");
I did this and I got this:
Код:
C:\DOCUME~1\KAMIL\Pulpit\UNITED~1\GAMEMO~1\u-tdm.pwn(113) : error 001: expected token: ";", but found "-identifier-"
C:\DOCUME~1\KAMIL\Pulpit\UNITED~1\GAMEMO~1\u-tdm.pwn(714) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Ranks - Puzi - 29.07.2009

Omg, please help, I can't do it myself!


Re: Ranks - pagie1111 - 29.07.2009



change new killscore to new killscore;

Thats all i can help you with :S



Re: Ranks - Puzi - 29.07.2009

That's the only one im left with, thanks for spotting my fault btw, didnt see that

Код:
C:\DOCUME~1\KAMIL\Pulpit\UNITED~1\GAMEMO~1\u-tdm.pwn(715) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Ranks - pagie1111 - 29.07.2009

what is on line 715?