Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - (SpCy)Alex

#1
Support / Error
Aug 06, 2018, 10:40 AM
I have a hunger system that gives me error in the tointeger (what is bad here i dont found error and it no work if one can help me please

local type = stream.ReadString();
   if(GetTok(type," ",1) == "spawn")
   {
      try{
      ::stats.Text = "Wanted level:"+GetTok(type," ",2)+" XP:"+GetTok(type," ",3);
      ::hunger.Value = GetTok(type," ",6).tointeger(); <------ Says it no exist  and spam in server this (the index 'tointeger' does not exist)
      }
      catch(e) Console.Print(e);
   }
Here he sends data to "spawn"

local hunger = ReadIniInteger("PlayerStats.ini","Hunger",player.Name);
   local xp = ReadIniInteger("PlayerStats.ini","XP",player.Name);
   Stream.StartWrite();
   Stream.WriteString("spawn "+player.WantedLevel+" "+xp+" "+hunger);
   Stream.SendStream(player)

///When player enter checkpoint
if(CheckpointColors(checkpoint,restaurant) == true)
   {
      Stream.StartWrite();
      Stream.WriteString("food");
      Stream.SendStream(player);
   }
   local hunger = ReadIniInteger("PlayerStats.ini","Hunger",player.Name);
   local xp = ReadIniInteger("PlayerStats.ini","XP",player.Name);
   Stream.StartWrite();
   Stream.WriteString("spawn "+player.WantedLevel+" "+xp+" "+hunger);
   Stream.SendStream(player);

if(GetTok(type," ",1) == "food")
   {
      switch(GetTok(type," ",2).tointeger())
      {
         case 1:
         {
            cash = 5;
            hunger = 5;
#2
Support / Help Whith !cmds
Jul 01, 2018, 01:22 PM
if someone could help me with a !command script I have a lot but none works

if ( ( Prefix == "!" ) && ( Count > 4 ) ) FCommand( Nick, Command.tolower(), Text );
          else if ( ( Prefix == "!" ) && ( Count == 4 ) ) FCommand( Nick, Command.tolower(), null );

          if (Nick && Command && Text)
{
 FCommand( Nick, Command, Text );
 }
          else if (Nick && Command)
 {
         FCommand( Nick, Command, null );
 }
#3
Support / Help me
Jun 19, 2018, 07:02 PM
It's been a while since I tried to make an anti-spam system but it does not work. Now that it works, the server crashed. Could someone help me?


class PlayerStats
{
Kills = 0;
Selected = null;
Count_Msg = 0;
Msg_Player = 0;
}
if ( Multa[ player.ID ] >= 1 ) E_MSG( "Usted esta muteado del chat por hacer spam!", player );
else
{
ClientMessageToAll( player.Name + "[#FFFFFF]: " + text, player.Color.r, player.Color.g, player.Color.b );
if ( text.slice( 0, 1 ) == "!" && text.find("! ") == null )
{
local i = NumTok( text, " " ), xp = null;
if ( i == 1 ) onPlayerCommand2( player, GetTok( text.slice( 1 ), " ", 1 ), xp );
else onPlayerCommand2( player, GetTok( text.slice( 1 ), " ", 1 ), GetTok( text.slice( 1 ), " ", 2, i ) );
}
CheckSpam( player, "Spam" );
return 1;
}
}

function CheckSpam( player, reason )
{
local MSNxSEC = 2000, LIMIT_REP_SPAM = 3;
local spammer = ( GetTickCount() - status[ player.ID ].Count_Msg ) / MSNxSEC;
status[ player.ID ].Msg_Player += spammer - 1;
if ( status[ player.ID ].Msg_Player > LIMIT_REP_SPAM ) status[ player.ID ].Msg_Player = LIMIT_REP_SPAM - 1;
if ( status[ player.ID ].Msg_Player < 0 ) status[ player.ID ].Msg_Player = -1;
status[ player.ID ].Count_Msg = GetTickCount();
if ( status[ player.ID ].Msg_Player < 0)
{
if ( Multa[ player.ID ] == 0 )
{
Multa[ player.ID ] = 30;
I_MSG( "Usted fue muteado por hacer spam.", player );
A_MSG( "Auto-Mute " + player.Name + ", ID: " + player.ID + ". Motivo:[ " + reason + " ].", player );
}
}
}

function UnMute( admin, player )
{
Multa[ player.ID ] = 0;
MSG( "Admin " + admin + " desmuteo " + player.Name + "." );
}
function S_MSG( text, player ) MessagePlayer( "[#00FF00]|SINTAXE|[#FFFFFF] " + text, player );

function E_MSG( text, player ) MessagePlayer( "[#FFA500]|ERRO|[#FFFFFF] " + text, player );

function I_MSG( text, player ) MessagePlayer( "[#00BFFF]|INFO|[#FFFFFF] " + text, player );

function A_MSG( text, player )

if someone could look at it and help me to know why the server crashed
#4
Servers / Spanish City Editor
Jan 12, 2018, 05:39 PM
Is a good server you can build!!!!!!!!!!!

Spanish City Editor IP: 83.173.156.238:2000                            Spanish City IP: 83.173.156.238:2000 GameMode RPG-DM-CS

Server Game-Mode: Mapping-Build-DM

Hosted by Me (SpCy)Alex

Scripter: (SpCy)Alex

Enter in my other`s servers Spanish City or Elite Server Roleplay (beta)