SA-MP Forums Archive
Little Help here? LuxAdmin - 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)
+--- Thread: Little Help here? LuxAdmin (/showthread.php?tid=376077)



Little Help here? LuxAdmin - Windrush - 09.09.2012

pawn Код:
if(text[0] == '*' && AccInfo[playerid][Level] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"|ChatVip| %s: %s",string,text[1]);
        MessageToPlayerVIP(0xDC686BAA,string);
        SaveIn("ChatVipLog",string);
        return 0;
    }
In This Script It Will Use Level 1 Above
But I want Only Level 1 To Level 3

***Sorry For My bad English


Respuesta: Little Help here? LuxAdmin - Bu11Sh0t - 09.09.2012

Replace this:
Код:
if(text[0] == '*' && AccInfo[playerid][Level] >= 1)
with this:
Код:
if(text[0] == '*' && AccInfo[playerid][Level] >= 1 && AccInfo[playerid][Level] <= 3)



Re: Little Help here? LuxAdmin - JaKe Elite - 09.09.2012

pawn Код:
if(text[0] == '*' && AccInfo[playerid][Level] == 1 || AccInfo[playerid][Level] == 2 || AccInfo[playerid][Level] == 3)



Re: Little Help here? LuxAdmin - clarencecuzz - 09.09.2012

pawn Код:
if(text[0] == '*' && AccInfo[playerid][Level] >= 1 && AccInfo[playerid][Level] < 4)
* * {
* * * * new string[128]; GetPlayerName(playerid,string,sizeof(string));
* * * * format(string,sizeof(string),"|ChatVip| %s: %s",string,text[1]);
* * * * MessageToPlayerVIP(0xDC686BAA,string);
* * * * SaveIn("ChatVipLog",string);
* * * * return 0;
* * }
EDIT: Not sure where all the *'s came from, but probably because I'm on an iPhone.


Re: Little Help here? LuxAdmin - Lordzy - 09.09.2012

This will do.
pawn Код:
if(text[0] == '*' && AccInfo[playerid][Level] == 1) || AccInfo[playerid][Level] == 2) || AccInfo[playerid][Level] == 3)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"|ChatVip| %s: %s",string,text[1]);
        MessageToPlayerVIP(0xDC686BAA,string);
        SaveIn("ChatVipLog",string);
        return 0;
    }