What is the problem?
#1

Hello, I'm having a little problem, My admin system is working great but it doesn't load the vehicles witch is in the gamemode, Also, When I put some other filterscripts with it they doesn't work, I think the problem is in the admin filterscript, Is there a way to know what is causing this and how to fix it ? Thanks
Reply
#2

Can you give us you'r log?
Reply
#3

You mean this?

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[13:35:26]
[13:35:26] Server Plugins
[13:35:26] --------------
[13:35:26] Loading plugin: sscanf
[13:35:26]

[13:35:26] ===============================

[13:35:26] sscanf plugin loaded.

[13:35:26] Version: 2.8.1

[13:35:26] © 2012 Alex "******" Cole

[13:35:26] ===============================

[13:35:26] Loaded.
[13:35:26] Loading plugin: Whirlpool
[13:35:26]
[13:35:26] ==================
[13:35:26]
[13:35:26] Whirlpool loaded
[13:35:26]
[13:35:26] ==================
[13:35:26]
[13:35:26] Loaded.
[13:35:26] Loading plugin: streamer
[13:35:26]

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[13:35:26] Loaded.
[13:35:26] Loaded 3 plugins.

[13:35:26]
[13:35:26] Ban list
[13:35:26] --------
[13:35:26] Loaded: samp.ban
[13:35:26]
[13:35:26]
[13:35:26] Filterscripts
[13:35:26] ---------------
[13:35:26] Loading filterscript 'Admin.amx'...
[13:35:26]
[13:35:26]
[13:35:26]
[13:35:26] =======================================
[13:35:26] | |
[13:35:26] | YSI version 3.09.0684 |
[13:35:26] | By Alex "******" Cole |
[13:35:26] | |
[13:35:26] =======================================
[13:35:26]
[13:35:26]
[13:35:26]
[13:35:26]
[13:35:26] Loading filterscript 'Gps.amx'...
[13:35:27] Loaded 2 filterscripts.
[13:35:27] Number of vehicle models: 173
Reply
#4

Everything in you'r gamemode is working fine except the cars right?
Did you put them in OnGameModeInit()
Reply
#5

Use streamer Plugin
Reply
#6

Quote:
Originally Posted by Efflictim
Посмотреть сообщение
[13:35:26] Loading plugin: streamer
[13:35:26]

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[13:35:26] Loaded.
Mbilal do you have eyes?
Reply
#7

pawn Код:
public OnGameModeInit()
{
 SetGameModeText("Gamemode");
 UsePlayerPedAnims();

 Time = TextDrawCreate(606.0,22.0,"00:00");
 TextDrawUseBox(Time, 0);
 TextDrawFont(Time, 3);
 TextDrawSetShadow(Time,0); // no shadow
 TextDrawSetOutline(Time,1); // thickness 1
 TextDrawBackgroundColor(Time,0x000000FF);
 TextDrawColor(Time,0xFFFFFFFF);
 TextDrawAlignment(Time,3);
 TextDrawLetterSize(Time,0.57, 2.100000);

 UpdateTime();
 SetTimer("UpdateTime",1000 * 60,1);

 LoadStaticVehiclesFromFile("vehicles/trains.txt");
 LoadStaticVehiclesFromFile("vehicles/pilots.txt");

    // LAS VENTURAS
    LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
    LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
    LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");

    // SAN FIERRO
    LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
    LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
    LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");

  // LOS SANTOS
    LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
    LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
    LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
    LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");

    // OTHER AREAS
    LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
    LoadStaticVehiclesFromFile("vehicles/bone.txt");
    LoadStaticVehiclesFromFile("vehicles/flint.txt");
    LoadStaticVehiclesFromFile("vehicles/tierra.txt");
    LoadStaticVehiclesFromFile("vehicles/red_county.txt");
 return 1;
}
Reply
#8

pawn Код:
LoadStaticVehiclesFromFile(const filename[])
{
    new File:file_ptr;
    new line[256];
    new var_from_line[64];
    new vehicletype;
    new Float:SpawnX;
    new Float:SpawnY;
    new Float:SpawnZ;
    new Float:SpawnRot;
    new Color1, Color2;
    new index;
    new vehicles_loaded;

    file_ptr = fopen(filename,filemode:io_read);
    if(!file_ptr) return 0;

    vehicles_loaded = 0;

    while(fread(file_ptr,line,256) > 0)
    {
      index = 0;

      // Read type
        index = token_by_delim(line,var_from_line,',',index);
        if(index == (-1)) continue;
        vehicletype = strval(var_from_line);
        if(vehicletype < 400 || vehicletype > 611) continue;

        // Read X, Y, Z, Rotation
        index = token_by_delim(line,var_from_line,',',index+1);
        if(index == (-1)) continue;
        SpawnX = floatstr(var_from_line);

        index = token_by_delim(line,var_from_line,',',index+1);
        if(index == (-1)) continue;
        SpawnY = floatstr(var_from_line);

        index = token_by_delim(line,var_from_line,',',index+1);
        if(index == (-1)) continue;
        SpawnZ = floatstr(var_from_line);

        index = token_by_delim(line,var_from_line,',',index+1);
        if(index == (-1)) continue;
        SpawnRot = floatstr(var_from_line);

        // Read Color1, Color2
        index = token_by_delim(line,var_from_line,',',index+1);
        if(index == (-1)) continue;
        Color1 = strval(var_from_line);

        index = token_by_delim(line,var_from_line,';',index+1);
        Color2 = strval(var_from_line);

        //printf("%d|%f|%f|%f|%f|%d|%d",vehicletype,
          //SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2);

        AddStaticVehicleEx(vehicletype,SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2,-1);

        vehicles_loaded++;
    }

    fclose(file_ptr);
    printf("Loaded %d vehicles from: %s",vehicles_loaded,filename);
    return vehicles_loaded;
}
// Tokenise by a delimiter
// Return string and index of the end determined by the
// provided delimiter in delim
token_by_delim(const string[], return_str[], delim, start_index)
{
    new x=0;
    while(string[start_index] != EOS && string[start_index] != delim) {
      return_str[x] = string[start_index];
      x++;
      start_index++;
    }
    return_str[x] = EOS;
    if(string[start_index] == EOS) start_index = (-1);
    return start_index;
}
Then use

pawn Код:
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
And so on..
Reply
#9

The problem isn't at the gamemode, When I remove/Unloadfs the admin system it works great, Same for the other filterscripts..
Reply
#10

When you restart the server the filterscripts are not reloaded I think. You need to unload/load them by RCON commands.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)