Author Topic: Weapon Spawner + AFK + Godmode by LeeXian99  (Read 218 times)

xian

  • Administrator
  • Newbie
  • **********
  • Posts: 8
  • Reputation: 0
    • View Profile
Weapon Spawner + AFK + Godmode by LeeXian99
« on: April 22, 2013, 11:56:47 am »
Hey guys, I've created a simple fliterscript which contained some commands! Anyway, this is my really first filterscript, hope you'll like it!

/weapons, /godmode and /afk! I know this is easy to create but I decided to publish it and I am using it on my server. ;)

So, here's some picture of it, I don't put IMG because its screen solution is too big! ( 1366*768 )

Pictures

Source: Download
.amx file: Download

You can edit it easily, but at least give me a credit. :) Thanks.

Share on Bluesky Share on Facebook


greentarch

  • Global Moderator
  • Newbie
  • ********
  • Posts: 16
  • Reputation: 0
    • View Profile
Re: Weapon Spawner + AFK + Godmode by LeeXian99
« Reply #1 on: April 22, 2013, 10:43:22 pm »
This is a good example if you want to practice ternary operators - e.g :
Code: [Select]
new
    bool: g_pGod[ MAX_PLAYERS ];

CMD:god( playerid, params[ ] )
{
    g_pGod[ playerid ] = !g_pGod[ playerid ]; // This is why I love booleans :3

    SetPlayerHealth(
        playerid,
        ( g_pGod[ playerid ] ) ? ( Float: 0x7F800000 ) : ( -1.0 )
    );

    SendClientMessage(
        playerid,
        -1,
        ( g_pGod[ playerid ] ) ? ( "Godmode turned on!" ) : ( "Godmode turned off!" )
    );

    return true;
}

KiNG3

  • Global Moderator
  • Newbie
  • ********
  • Posts: 10
  • Reputation: 0
    • View Profile
Re: Weapon Spawner + AFK + Godmode by LeeXian99
« Reply #2 on: April 25, 2013, 06:55:14 am »
I saw it on SAMP Forums, basic script.... but at least you didn't add random functions to it to complicate others. So good :)