server.cfg
#1

I've followed a tutorial and made a skin select script.I compiled it and it shows no errors.
But now I want to try it in my test server but I don't know how to put it in it.
I saved the code in 'gamemodes' folder .It has both pwn file and amx.

Here is how the server.cfg looks:

Код:
echo Executing Server Config...
lanmode 1
rcon_password incorrectpassword
maxplayers 50
port 7777
hostname TestServer
gamemode 0 skin 11
filterscripts 
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Correct me up by re writing that cfg and telling me what you have done please.I'd really appreciate it.

Thanks.
Reply
#2

I believe this is what you're looking for:

Код:
echo Executing Server Config...
lanmode 1
rcon_password incorrectpassword
maxplayers 50
port 7777
hostname TestServer
gamemode 0 skin 11
filterscripts FILTERSCRIPT NAME HERE!
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
At filterscripts, put the name of the amx file without the .amx. It's always the AMX as it's compiled into this format that samp uses.

Hope this helps.
Reply
#3

I did it.But still it shows 'BLANK SCRIPT'.

echo Executing Server Config...
lanmode 1
rcon_password incorrectpassword
maxplayers 50
port 7777
hostname TestServer
gamemode 0 skin 11
filterscripts skin
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M
Reply
#4

Is your gamemode also named skin?
Reply
#5

Why are you running this as a gamemode and a filterscript?
Код:
gamemode 0 skin 11
filterscripts skin
EDIT: 1,000th post! Woo.
Reply
#6

Then what should I run the filterscript as?I really don't know what filterscript means.
Which file should I take from filterscript folder?

Off:
Congratz :P 1000 posts.
Reply
#7

What gamemode are you trying to use?

A filterscript is effectively an add-on, if you will.
Basically it's code added to a gamemode, without the gamemode code.

GAMEMODE - FILTERSCRIPT.
All Main Stuff All extra stuff you want.

OFFT: Thanks!
Reply
#8

The gamemode,skin.
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include "../include/gl_common.inc"
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif
#define COLOR_RED 0xAA3333AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_SPAWN 0xFF8C55FF
#define COLOR_LIGHTBLUE 0x6DC5F3FF
#define COLOR_ADMIN 0xFF0000FF
#define COLOR_SAY 0x2986CEFF
#define COLOR_SYSGREY 0xC6BEBDFF
#define COLOR_BLACK 0x000000FF
#define COLOR_JOIN 0x74E80099
#define COLOR_WARN 0xBE615099
#define COLOR_RACE 0x00BBBB99
#define COLOR_KRED 0xFF0000FF

new idx;

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/skin", cmdtext, true, 10) == 0)
    {
        new tmp[256];
        tmp = strtok ( cmdtext, idx );
        if ( !strlen ( tmp ) )
        {
            SendClientMessage(playerid, COLOR_RED, "USAGE: /skin [ID]");
            return 1;
  }
        SetPlayerSkin(playerid, strval(tmp));
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#9

The keyword is gamemode0 as one word. No space between 'gamemode' and '0'.
Reply
#10

Man, Dokins say that you must insert your skin.amx files in FILTERSCRIPTS folder.
In the server.cfg u must do that.
On gamemode0 field insert the name of the gamemode that u're using
(Ex. gamemode0 larp 1)

Код:
echo Executing Server Config...
lanmode 1
rcon_password incorrectpassword
maxplayers 50
port 7777
hostname TestServer
gamemode0 NAME OF UR GAMEMODE 1
filterscripts skin
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)