SA-MP Forums Archive
Making /n 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: Making /n ranks? (/showthread.php?tid=185482)



Making /n ranks? - Luis- - 24.10.2010

Hey, I am wanting to make a Ranking system so say a Helper talked in /n it would be Helper Luis_Foxx: Blah Blah But of a noob did /n it would be Noob Luis_Foxx: Blah Blah

Pawn code;
pawn Код:
if(!strcmp(cmdtext,"/n",true,2))
    {
        if(PlayerInfo[playerid][Newbie] ==0) return SendClientMessage(playerid,0xffffffaa,"You are not a newbie"); //checking if a player is not a noob, change it to your variable if any
        if(NewbieChat == false) return SendClientMessage(playerid, COLOR_ADMIN, "Newbie chat is disabled!");
        new name[MAX_PLAYER_NAME];
        new string[256];
        GetPlayerName(playerid,name,sizeof(name));
        for(new i=0; i< MAX_PLAYERS;i++)
        {
            if(PlayerInfo[i][Newbie] ==1)
            {
                format(string,sizeof(string),"[NewbieChat] %s: %s",name,cmdtext[3]);
                SendClientMessage(i,COLOR_GREEN,string);
            }
        }
        return 1;
    }



Re: Making /n ranks? - Bogdanovic - 24.10.2010

A new Var Char, Rank

format(string,sizeof(string),"[NewbieChat] (%s) %s : %s", rank, name, cmdtext[3]);