hulp please :]
#1

I'm making a script, it's done but I get a warning:
Код:
C:\Documents and Settings\Administrator\Desktop\The server\filterscripts\DK-FS.pwn(291) : warning 203: symbol is never used: "ret_memcpy"
C:\Documents and Settings\Administrator\Desktop\The server\filterscripts\DK-FS.pwn(291) : warning 203: symbol is never used: "split"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
and the whole script:
pawn Код:
#include <a_samp>
#include <ldudb>
#include <lfuncs>

enum gPInfo
{
    DKLevel,
    MaxAdminLevel,
    LoggedIn,
    Registered
};
new PInfo[MAX_PLAYERS][gPInfo],
    AdmRank[128];

//==============================================================================
// DEFINES
//==============================================================================
#define FILTERSCRIPT
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOR_GREY 0xAFAFAFAA
#define orange 0xFF9900AA
#define red 0xFF0000AA
#define yellow      0xFFFF00AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_VIOLET 0x9955DEEE
#define COLOR_LIGHTRED 0xFF99AADD
#define COLOR_SEAGREEN 0x00EEADDF
#define COLOR_GRAYWHITE 0xEEEEFFC4
#define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
#define COLOR_GREENISHGOLD 0xCCFFDD56
#define COLOR_LIGHTBLUEGREEN 0x0FFDD349
#define COLOR_NEUTRALBLUE 0xABCDEF01
#define COLOR_LIGHTCYAN 0xAAFFCC33
#define COLOR_LEMON 0xDDDD2357
#define COLOR_MEDIUMBLUE 0x63AFF00A
#define COLOR_NEUTRAL 0xABCDEF97
#define COLOR_BLACK 0x00000000
#define COLOR_NEUTRALGREEN 0x81CFAB00
#define COLOR_DARKGREEN 0x12900BBF
#define COLOR_LIGHTGREEN 0x24FF0AB9
#define COLOR_BLUE2 0x300FFAAB
#define COLOR_BLUEGREEN 0x46BBAA00
#define COLOR_PINK 0xFF66FFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_RED1 0xFF0000AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD1 0xB4B5B7FF
#define GREY 0xAFAFAFAA
#define BLUE2 0x92E4F4FF

//==============================================================================
// FORWARDS
//==============================================================================
forward MessageToAdmins(color,const string[]);
//==============================================================================
// On FilterScript Initiation
//==============================================================================

public OnFilterScriptInit()
{
    print("\n---------------------------------------------");
    print(" ***Drift King FilterScript has been loaded*** ");
    print("---------------------------------------------\n");
    return 1;
}

//==============================================================================
// FilterScript closing
//==============================================================================

public OnFilterScriptExit()
{
    return 1;
}

//==============================================================================
// [ONPLAYERCONNECT]
//==============================================================================

public OnPlayerConnect(playerid)
{
    PInfo[playerid][LoggedIn] = 0;
    PInfo[playerid][Registered] = 0;
    PInfo[playerid][DKLevel] = 0;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return 1;
}

//==============================================================================
// [ONPLAYERCOMMANDTEXT]
//==============================================================================

public OnPlayerCommandText(playerid,cmdtext[])
{

    //==================
    // DCMD MAKERS
    //==================
    dcmd(dkadmins,8,cmdtext);
    //==================
   
//==============================================================================
// DRIFT KING RANK CHANGER
//==============================================================================
    if(strcmp(cmdtext,"/setdklevel",true) == 0)
    {
        if(PInfo[playerid][DKLevel] >= 5 || IsPlayerAdmin(playerid))
        {
            new tmp [256];
            new tmp2[256];
            new Index;
            tmp  = strtok(cmdtext,Index);
            tmp2 = strtok(cmdtext,Index);
            if(!strlen(cmdtext))
            {
            SendClientMessage(playerid,COLOR_LIME,"Usage: /setdklevel [PlayerID] [DK Rank]");
            }
            new player1, DKlevel, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            player1 = strval(tmp);
            if(!strlen(tmp2)) return
            SendClientMessage(playerid, COLOR_LIME, "Usage: /setdklevel [PlayerID] [DK Rank]");
            if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
            if(PInfo[player1][LoggedIn] == 1)
            {
                if(DKlevel == PInfo[player1][DKLevel])
                return SendClientMessage(playerid,red,"ERROR: Player is already this level!");
                MessageToAdmins(playerid,"SetDKLevel");
                GetPlayerName(player1, playername, sizeof(playername));
                GetPlayerName(playerid, adminname, sizeof(adminname));
                new year,month,day;
                new hour,minute,second;
                getdate(year, month, day);
                gettime(hour,minute,second);

                if(PInfo[playerid][DKLevel] > 5)
                {
                AdmRank = "Professional Drifter";
                }
                switch(DKLevel)
                {
                case 1: AdmRank = "Amazing Drifter";
                case 2: AdmRank = "Awesome Drifter";
                case 3: AdmRank = "Master Drifter";
                case 4: AdmRank = "Outrageous Drifter";
                case 5: AdmRank = "Insane Drifter";
                case 6: AdmRank = "Drift King";
                }
                if(DKlevel > 5)
                format(string,sizeof(string),"You are now a DK player level %d - %s. Thanks to %s ", DKLevel, AdmRank, adminname);
                else
                format(string,sizeof(string),"You are now a DK player level %d - %s. Thanks to %s", DKLevel, AdmRank, adminname);
                SendClientMessage(player1,COLOR_LIME,string);
                if(PInfo[player1][DKLevel])
                GameTextForPlayer(player1,"Promoted", 2000, 3);
                else GameTextForPlayer(player1,"Demoted", 2000, 3);

                format(string,sizeof(string),"You have given %s Level %d on '%d/%d/%d' at '%d:%d:%d'", playername, DKLevel, day, month, year, hour, minute, second);
                SendClientMessage(playerid,COLOR_YELLOW,string);
                format(string,sizeof(string),"Administrator %s has made %s Level %d",adminname, playername, DKLevel);
               
                PInfo[playerid][DKLevel] = DKLevel;
                return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
                }
                else return SendClientMessage(playerid,red,"ERROR: This player is not Registred!");
            }
            else return SendClientMessage(playerid,red,"You are not the [DK] Leader!");
        }
        else return SendClientMessage(playerid,red,"You are not the [DK] Administrator!");
    }
    return 0;
}

dcmd_dkmembers(playerid,params[])
{
    #pragma unused params
        new count = 0;
        new string[128];
        SendClientMessage(playerid, COLOR_GREEN, "=======================================");
        SendClientMessage(playerid, COLOR_GREEN, "==========[DK PLAYERS ONLINE]==========");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
        if (IsPlayerConnected(i))
        {
        if(PInfo[i][DKLevel] >= 1)
        {
        if(PInfo[i][DKLevel] > 5) {
        AdmRank = "Professional Drifter";
        }
        else
        switch(PInfo[i][DKLevel])
        {
        case 1: AdmRank = "Amazing Drifter";
        case 2: AdmRank = "Awesome Drifter";
        case 3: AdmRank = "Master Drifter";
        case 4: AdmRank = "Outrageous Drifter";
        case 5: AdmRank = "Insane Drifter";
        case 6: AdmRank = "Drift King";
        }
        format(string, 128, "%s [ID %i] [Level: %d - %s]",PlayerName2(i),i,PInfo[i][DKLevel], AdmRank);
        SendClientMessage(playerid, yellow, string);
        count++;
        }
        }
        }
        if (count == 0)
        SendClientMessage(playerid,red,"No Drift King members are online. Sorry.");
        SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
        return 0;
    }

public MessageToAdmins(color,const string[])
{
    return 1;
}

public OnPlayerText(playerid,text[])
{
    if(text[0] == '*' && PInfo[playerid][DKLevel] >= 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"%s says: %s",string,text[155]);
        MessageToAdmins(COLOR_YELLOW,string);
        return 1;
    }
    return 0;
}
Reply
#2

Add:

pawn Код:
#pragma unused ret_memcpy
#pragma unused split
Off:
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 33 seconds.
= Annoying
Reply
#3

has jakku sayed
pawn Код:
#pragma unused ret_memcpy
#pragma unused split
and hi new player from Underground stunt world
Reply
#4

:O How'd you know i'm from Underground Stunt World? I mean how come you knew it? xD Thanks.
Reply
#5

Ummm....there's a problem. Since I compiled this script, i type '/setdklevel' it says "Usage:/setdklevel [Player ID] [DK Rank]. But when I type /setdklevel 0 5 to test it on myself, it says SERVER:Unknown Command. Any help? thanks.


sorry for the double-post(ing).
Reply
#6

Quote:
Originally Posted by New_Player[USW]
Посмотреть сообщение
Ummm....there's a problem. Since I compiled this script, i type '/setdklevel' it says "Usage:/setdklevel [Player ID] [DK Rank]. But when I type /setdklevel 0 5 to test it on myself, it says SERVER:Unknown Command. Any help? thanks.


sorry for the double-post(ing).
Login to RCON admin.

/RCON login (your pass)

Then you can use your /setdklevel 0 5 cmd.

ollis93.
Reply
#7

Quote:
Originally Posted by ollis93
Посмотреть сообщение
Login to RCON admin.

/RCON login (your pass)

Then you can use your /setdklevel 0 5 cmd.

ollis93.
OR, *I guess* you can change this line:
if(PInfo[playerid][DKLevel] >= 5 || IsPlayerAdmin(playerid))

change it to:
if(PInfo[playerid][DKLevel] >= 0 || IsPlayerAdmin(playerid))

*BUT REMEMBER TO CHANGE IT BACK TO 5, OR ELSE EVERYONE CAN CHANGE EACH OTHERS "DK" LEVEL*
Reply
#8

if(PInfo[playerid][DKLevel] >= 0 || IsPlayerAdmin(playerid))

That fails. >= means anyone level 0 or up.
Reply
#9

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
if(PInfo[playerid][DKLevel] >= 0 || IsPlayerAdmin(playerid))

That fails. >= means anyone level 0 or up.
Exactly, he want to make himself a level 5. And he is level 0.
Reply
#10

Quote:
Originally Posted by ollis93
Посмотреть сообщение
Exactly, he want to make himself a level 5. And he is level 0.
anyone level 0+ can use the makeadmin command. Meaning that ANYONE can do it.
Reply
#11

Quote:
Originally Posted by Hal
Посмотреть сообщение
anyone level 0+ can use the makeadmin command. Meaning that ANYONE can do it.
Oh my god...
He makes himself a level 4 or 5 admin. And then he changes it back to 4 after he is a level 4 or 5.
- Hes point was, that he could not make himself an admin, because he was not admin himself. OMG.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)