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

Messages - Yankee

#16
Thanks guys it worked properly :)
#17
Can anyone help me i installed this system it is working very good but it isn't save stats.What should I do or where i did wrong ?
#18
Hi guys,
Question is simple,first i made a system for this but it's not working properly.Can someone help me to fix this code or give me working code ?

else if ( cmd == "givescore" )
    {
        if(!text) MessagePlayer( "[#ffffff]syntax - /givescore <playerName> <Amount>", player );
        else
        {
            local params = split( text, " " ), plr = FindPlayer( params[0] ), amount = params[1];
            if(!plr) MessagePlayer( "[#ffffff]Error - invalid player", player );
            else if(!ammount || !IsNum( ammount )) MessagePlayer( "[#ffffff]Error - The Ammount must be integer", player );
            else
            {
                plr.Score(ammount.tointeger());
                MessagePlayer( "[#DC26FF]"+player.Name+" given $"+ammount.tointeger()+" to you",plr);
                MessagePlayer( "[#DC26FF]You gave $"+ammount.tointeger()+" > "+plr.Name,player);
                SaveAccount(plr)
            }
        }
    }
#19
Hi guys,it is a very simple question.How I change this code ?I want to explode players with this code like /playerid player.Pos buuum :)

CreateExplosion( world, type, pos, playerCaused, onGround )
#20
Quote from: kennedyarz on Jun 10, 2017, 10:59 PMSpammers <- array(100);change for
Spammers  <- array( GetMaxPlayers(), null );or
Spammers  <- array(100, null );
Thanks for you advice i added it but nothing changed :P
#21
Quote from: Zeeshan.Bhatti on Jun 10, 2017, 05:37 PMCan you post the errors without that we can't help you.

There's no error and it's not working ;D probably i did something wrong,maybe i forgot something important.Can you see something in the my commands.I pasted them.
#22
Quote from: Zeeshan.Bhatti on Jun 10, 2017, 02:57 PMYou are ready to use this now, if any other error occurs you can post here.

I'm using now but it doesn't work,I did something wrong,command,line or column error etc.Can you check again for me ?
#23
Hi guys,my fix code is working very good.But players can use fix although they don't have any money.They can use it without money.Can someone add a command for this ?I want players can't use this command without money.Command must stop the player with a message like this"You can't use this command without cost".

else if ( cmd == "fix" )
 {
 if ( !player.Vehicle ) MessagePlayer( "There is no car for fix.", player );
 else if ( ( player.Vehicle.Health == 1000 )  && ( player.Vehicle.GetTyre(0) == 0 || player.Vehicle.GetTyre(1) == 0 || player.Vehicle.GetTyre(2) == 0 || player.Vehicle.GetTyre(3) == 0 ) ) MessagePlayer( "Error.", player );
 else
  {
  player.Cash -=250
  player.Vehicle.Fix();
  MessagePlayer( "Fixed.", player );
  }
 }
#24
Quote from: EK.IceFlake on Jun 10, 2017, 04:59 AMRename onPlayerLeave to onPlayerPart and onPlayerMessage to onPlayerChat.
Look at this,I added my scripts.Where did I wrong ?Can you find it,please.
This is array 100

function onScriptLoad()
{
{
print(">>> System SubBan loaded <<<");
db <- ConnectSQL( "DataBase.db" );
QuerySQL( db, "CREATE TABLE IF NOT EXISTS SubBans ( Name VARCHAR(32), IP VARCHAR(25), Admin TEXT, Reason TEXT )" );
}
    AddClass( 1, RGB( 0, 191, 255 ) ,201, Vector( 372, -478, 13.8172 ), 130.0325, 21, 999 ,17, 200, 4, 255 );
    AddClass( 1, RGB( 30,144,255 ) ,202 Vector( -660, 760, 11.0862 ), 130.0325, 101, 999 ,17, 200, 104, 1000 );
    AddClass( 1, RGB( 0, 139, 0 ) ,203, Vector( -1715.79, -160, 15 ), 140.020, 105, 999 ,100, 200, 12, 255 );
    AddClass( 2, RGB( 255, 48, 48 ) ,204, Vector( -25, 0, 24 ), 140.020, 103, 999 ,102, 25, 15, 50 );
    AddClass( 2, RGB( 255, 48, 48 ) ,205, Vector( -695, -1583, 12 ), 140.020, 19, 999 ,28, 100, 23, 1000 );
    AddClass( 1, RGB( 255, 215, 0 ) ,28, Vector( -1009, 196, 11.3937 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 3, RGB( 255, 255, 255 ) ,7, Vector( -841, 551, 10.930 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 4, RGB( 255, 255, 255 ) ,11, Vector( 464, -456, 10.532 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 5, RGB( 255, 255, 255 ) ,27, Vector( 387, -693, 10.97 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 6, RGB( 255, 255, 255 ) ,55, Vector( 464, -456, 10.532 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 7, RGB( 255, 255, 255 ) ,95, Vector( -213, -1440, 8.1129 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 8, RGB( 255, 255, 255 ) ,104, Vector( -776, 977, 10.8241 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 9, RGB( 255, 255, 255 ) ,114, Vector( -394, 894, 10.6133 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 10, RGB( 255, 255, 255 ) ,167, Vector( 464, -456, 10.532 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 11, RGB( 255, 255, 255 ) ,169, Vector( -855, 666, 10.9932 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 12, RGB( 255, 255, 255 ) ,131, Vector( -607, 652, 10.5843 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 13, RGB( 255, 255, 255 ) ,19, Vector( -842, -679, 10.9420 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 14, RGB( 255, 255, 255 ) ,58, Vector( 336, 1201, 17.1962 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 15, RGB( 255, 255, 255 ) ,13, Vector( -753, 927, 11.2812 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 16, RGB( 255, 255, 255 ) ,14, Vector( -782, 672, 10.8485 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 17, RGB( 255, 255, 255 ) ,17, Vector( 387, -693, 10.97 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 18, RGB( 255, 255, 255 ) ,21, Vector( -757, 1333, 11.39 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 19, RGB( 255, 255, 255 ) ,22, Vector( -975, -831, 6.4925 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 20, RGB( 255, 255, 255 ) ,54, Vector( -848, -909, 10.9547 ), 140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 21, RGB( 255, 255, 255 ) ,157, Vector( 387, -693, 10.97 ),  140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 22, RGB( 255, 255, 255 ) ,174, Vector( 387, -693, 10.97 ),  140.020, 0, 0 ,0, 0, 0, 0 );
    AddClass( 23, RGB( 255, 255, 255 ) ,100, Vector( 387, -693, 10.97 ), 140.020, 0, 0 ,0, 0, 0, 0 );
Spammers <- array(100);
}
This is PlayerJoin function

function onPlayerJoin( player )
{
                ClientMessage("-> [#daff00]Sunucumuza hosgeldiniz,/hesap yazarak girmeyi UNUTMAYIN.",player,255,0,102);
                ClientMessage("-> [#83bab3]Admin Facebook adresi:www.facebook.com/saidbali443",player,255,0,102);
                ClientMessage("-> [#83bab3]/komutlar yazarak komutlara bakabilirsiniz.",player,255,0,102);
                ClientMessage("-> [#83bab3]AY YILDIZ TURKEY.",player,255,0,102);
                NewTimer( "CheckBan", 1000, 1, player.ID );
    //...
    Spammers[player.ID] = ["", "", ""];
    //...   
}

This is PlayerPart function

function onPlayerPart( player, reason )
{
//...
Spammers[player.ID] = ["", "", ""];
//...
WriteIniBool("Stats.ini","Logged",player.UniqueID, false)
if (ReadIniBool("Stats.ini","Logged",player.UniqueID))
{
SaveAccount(player)
}
}

This is PlayerChat function

function onPlayerChat( player, text )
{
print( player.Name + ": " + text );
return 1;
    Spammers[player.ID][0] = Spammers[player.ID][1];
    Spammers[player.ID][1] = Spammers[player.ID][2];
    Spammers[player.ID][2] = message;
    if (Spammers[player.ID][0] == Spammers[player.ID][1] && Spammers[player.ID][1] == Spammers[player.ID][2])
    {
        MessageAll(player.Name + " spam yapmaktan ATILDI!");
        player.Kick();
    }
}











#25
Quote from: Zeeshan.Bhatti on Jun 09, 2017, 05:19 PMonPlayerLeave & onPlayerMessage which functions is this?

My scripter friend send me this mate.He said if i add these into main.nut,ıt can work.Where should I add the onPlayerLeave and onPlayerMessage function's ?
#26
Quote from: Zeeshan.Bhatti on Jun 09, 2017, 09:48 AMPost your codes and errors here instead.

[b]Spammers <- array(100);
function onPlayerJoin(player)
{
    //...
    Spammers[player.ID] = ["", "", ""];
    //...
}
function onPlayerLeave(player, reason)
{
    //...
    Spammers[player.ID] = ["", "", ""];
    //...
}
function onPlayerMessage(player, message)
{
    Spammers[player.ID][0] = Spammers[player.ID][1];
    Spammers[player.ID][1] = Spammers[player.ID][2];
    Spammers[player.ID][2] = message;
    if (Spammers[player.ID][0] == Spammers[player.ID][1] && Spammers[player.ID][1] == Spammers[player.ID][2])
    {
        MessageAll(player.Name + " has been kicked for spamming.");
        player.Kick();
    }
}[/b]
Here it is,I added all of this to my main.nut.I added array 100 in scriptload.Why it it not working ?I did something wrong .
#27
Hi guys,
I searched a lot for a spam system for my server.I found some scripts but i can't use it properly.It gives script errors.I tried to make my own spam system but it don't work ,i did something wrong.Can someone help me ?
#28
Quote from: Doom_Kill3R on May 28, 2017, 08:07 AM:edit: If you are not trying yourself to do anything then get aware of one thing, nobody got time to sit here and code stuff for you. Do your stuff yourself, ask for help if your code doesn't work which you made yourself

Hey man,i did my stuff already,I'm working on this system for three days.Here is my script:[spoiler]
else if ( cmd == "silah" )
{
if ( !text ) MessagePlayer( " /weapon id", player );
else
  {
local wep = text;
   switch(wep)
  {
     case "motor":
     if (player.Cash < 1000) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(11,1);
     player.Money      -=1000;
  }
   
     case "bomba":
     if (player.Cash < 500) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(12,10);
     player.Money      -=500;
  }
   
     case "gaz":
     if (player.Cash < 600) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(14,10);
     player.Money      -=600;
  }
   
     case "molotof":
     if (player.Cash < 1200) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(15,15);
     player.Money      -=1200;
  }
   
     case "roketatar":
     if (player.Cash < 5000) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(102,25);
     player.Money      -=5000;
  }
   
     case "tabanca":
     if (player.Cash < 400) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(17,200);
     player.Money      -=400;
  }
   
     case "spaz":
     if (player.Cash < 2500) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(20,100);
     player.Money      -=2500;
  }
   
     case "stubby":
     if (player.Cash < 1500) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(21,100);
     player.Money      -=1500;
  }
   
     case "tec9":
     if (player.Cash < 1400) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(22,200);
     player.Money      -=1400;
  }
   
     case "uzi":
     if (player.Cash < 1600) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(23,200);
     player.Money      -=1600;
  }
   
     case "mac10":
     if (player.Cash < 1300) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(24,600);
     player.Money      -=1300;
  }
   
     case "mp5":
     if (player.Cash < 2000) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(104,1000);
     player.Money      -=2000;
  }
   
     case "minigun":
     if (player.Cash < 10000) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(33,500);
     player.Money      -=10000;
  }
   
     case "m4":
     if (player.Cash < 2600) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(100,29);
     player.Money      -=2600;
  }
   
     case "ak47":
     if (player.Cash < 2750) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(103,29);
     player.Money      -=2750;
  }
   
     case "m249":
     if (player.Cash < 3500) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(105,29);
     player.Money      -=3500;
  }
   
     case "barret":
     if (player.Cash < 4000) MessagePlayer("Yetersiz para!", player)
     else {
     player.SetWeapon(101,29);
     player.Money      -=4000;
  }
     break;
default:
MessagePlayer( "Invalid id", player );
break;
}
}
}
 [/spoiler]

But PlayerMessage's which said to players Yetersiz Para (not enough money) is sended 17 times.Because i make a script fail.I want all messages to players(Yetersiz para-not enough money)weapon by weapon.I can't describe it is hard but i believe anyone come and fix my problem.


#29
Hi guys,i tried all systems and they not work properly.I want players can take a weapon with cost,for example player can take a minigun with $5000 and other can take a M4 with $2500.Thanks from now.
#30
Quote from: sseebbyy on May 27, 2017, 09:26 AM
Quote from: Yankee on May 27, 2017, 08:29 AMHelp me it gives error on cmd : AN ERROR HAS OCCURED [the index 'command' does not exist

Use this format for your function:
onPlayerCommand( player, command, text )
Then (by the instalation guide of this system) you will have this as a top line in the function:
local cmd = command.tolower();

Thanks mate like +1