PM_System errors with nativechecker
#1

http://oi62.tinypic.com/9lkepj.jpg

This is what i get in Nativechecker, with bare script, with my script it get the run time error 19(Even though i ot amx file). so i though there is a problem with PM_system. well there is i guess so anyone can fix it?


Here is CFG file:
Код:
echo Executing Server Config...
lanmode 0
rcon_password PassPass
maxplayers 5
port 7777
hostname Stuff_EMR_CNR
gamemode0 bare 0
filterscripts case emr_speed gps pm_system
plugins sscanf streamer nativechecker
announce 1
query 1
chatlogging 0
weburl www.nvcnr.net
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Reply
#2

Did you install sscanf correctly? (sscanf folder into your server directory, added the dll into the plugins folders?)
If yes, please show me your script.

Raaf
Reply
#3

I do have sscanf folder and plugin and .inc.

here is pm system:
Код:
[pawno]
//// scripter bros lol mark and tony
#include <a_samp>
#include <sscanf2>

#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

#pragma tabsize 0

#define COLOR_RED 0xFF0000FF
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFF9900AA


enum PlayerInfo
{
        Last,
        NoPM,
}

new pInfo[MAX_PLAYERS][PlayerInfo];

public OnFilterScriptInit()
{
        print("\n--------------------------------------------");
        print(" PM System, Created by mark and drunk tony  ");
        print("--------------------------------------------\n");
        return 1;
}

public OnFilterScriptExit()
{
    print("\n--------------------------------------------");
        print(" PM System Shut down ");
        print("--------------------------------------------\n");
        return 1;
}

public OnPlayerConnect(playerid)
{
        pInfo[playerid][Last] = -1;
        pInfo[playerid][NoPM] = 0;
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    pInfo[playerid][Last] = -1;
        pInfo[playerid][NoPM] = 0;
        return 1;
}

stock PlayerName(playerid)
{
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        return pName;
}

dcmd_nopm(playerid, params[])
{
        #pragma unused params
        if(pInfo[playerid][NoPM] == 0)
        {
            pInfo[playerid][NoPM] = 1;
            SendClientMessage(playerid, COLOR_YELLOW, "You are no longer accepting private messages.");
        }
        else
        {
            pInfo[playerid][NoPM] = 0;
            SendClientMessage(playerid, COLOR_YELLOW, "You are now accepting private messages.");
        }
}

dcmd_pm(playerid, params[])
{
        new pID, text[128], string[128];
        if(sscanf(params, "us", pID, text)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /pm (nick/id) (message) - Enter a valid Playername / ID");
        if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected. ");
        if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot PM yourself.");
        format(string, sizeof(string), "%s (%d) is not accepting private messages at the moment. ", PlayerName(pID), pID);
        if(pInfo[pID][NoPM] == 1) return SendClientMessage(playerid, COLOR_RED, string);
        format(string, sizeof(string), "PM to %s: %s", PlayerName(pID), text);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        format(string, sizeof(string), "PM from %s: %s", PlayerName(playerid), text);
        SendClientMessage(pID, COLOR_YELLOW, string);
        pInfo[pID][Last] = playerid;
        return 1;
}

dcmd_reply(playerid, params[])
{
        new text[128], string[128];
        if(sscanf(params, "s", text)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /reply (message) - Enter your message");
        new pID = pInfo[playerid][Last];
        if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
        if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot PM yourself.");
        format(string, sizeof(string), "%s (%d) is not accepting private messages at the moment.", PlayerName(pID), pID);
        if(pInfo[pID][NoPM] == 1) return SendClientMessage(playerid, COLOR_RED, string);
        format(string, sizeof(string), "PM to %s: %s", PlayerName(pID), text);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        format(string, sizeof(string), "PM from %s: %s", PlayerName(playerid), text);
        SendClientMessage(pID, COLOR_YELLOW, string);
        pInfo[pID][Last] = playerid;
        return 1;
}

dcmd_ms(playerid, params[]) return dcmd_pm(playerid, params);
dcmd_m(playerid, params[]) return dcmd_pm(playerid, params);
dcmd_r(playerid, params[]) return dcmd_reply(playerid, params);

public OnPlayerCommandText(playerid, cmdtext[])
{
        dcmd(pm, 2, cmdtext);
        dcmd(ms, 2, cmdtext);
        dcmd(m, 1, cmdtext);
        dcmd(r, 1, cmdtext);
        dcmd(reply, 5, cmdtext);
        dcmd(nopm, 4, cmdtext);
        return 0;
}
[/pawno]
PS: My friend made it, so i am not sure if it has some critical error. This compiles finely.
Reply
#4

Alright. I checked it out and for me it works as a charm.

Please do the next things:

- download the last package of sscanf, and replace it in your folder. click here to download the last version of sscanf
- download the last package of nativechecker, and replace it in your plugins folder. click here to download nativechecker (download direct)
- download the last package of streamer, and replace it in your folder. click here to download streamer

There you go!
Raaf

(please rep if it works)
Reply
#5

You fixed all my problems, Thanks man!


+1 rep for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)