04 Desember, 2012

PAWNO Programming | A simple PM for SA-MP.

Alright guys, today I wanna show you how to make a Personal Message or also known as PM simply. The includes are sscanf and zcmd. Alright let's see.

First insert these codes on top of your script
#include <a_samp>
#include <sscanf>
#include <zcmd>

And then insert this codes in bottom of your script or in your CMDs section.
CMD:pm(playerid, params[])
{
         new id, msgs[100], string[140], sender[MAX_PLAYER_NAME], target[MAX_PLAYER_NAME];
         if(sscanf(params, "us", id, msgs)) return SendClientMessage(playerid, Your Color, "CMD: /pm [target]");
         if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, Your Color, "ERROR: Player not found");
         else
         {
                GetPlayerName(playerid, sender, sizeof(sender));
                GetPlayerName(id, target, sizeof(target));
                format(string, sizeof(string), "%s : %s", sender, msgs);
                SendClientMessage(id, Your Color, string);
                format(string, sizeof(string), "Sent to %s: %s", target, msgs);
                SendClientMessage(playerid, Your Color, string);
         }
         return 1;
}

Okay i'll explain it to you,
These codes
CMD:pm(playerid, params[])
{
         new id, msgs[100], string[140], sender[MAX_PLAYER_NAME], target[MAX_PLAYER_NAME];
         if(sscanf(params, "us", id, msgs)) return SendClientMessage(playerid, Your Color, "CMD: /pm [target]");
They'll scan the player's command, if the players aren't fill the CMD form, the server gonna send error message or tell the player about the structures of this command.

And then these codes

if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, Your Color, "ERROR: Player not found");
         else
         {
                GetPlayerName(playerid, sender, sizeof(sender));
                GetPlayerName(id, target, sizeof(target));
                format(string, sizeof(string), "%s : %s", sender, msgs);
                SendClientMessage(id, Your Color, string);
                format(string, sizeof(string), "Sent to %s: %s", target, msgs);
                SendClientMessage(playerid, Your Color, string);
         }
These codes mean it'll process the command, if the player's target isn't connect, the server'll send an error message, otherwise if the player's target was connected it'll continue the process with scanning player's name and the target's name, eventually the server will send the message to each player

That's all for today, thank you for visiting my site, and sorry for my bad english and my another mistakes.
Best regards, Ryu a.K.a Raveronze

17 November, 2012

Scuffle World Online SA-MP Server || Under Construction

       Scuffle World Online, adalah Server SA-MP (San Andreas Multiplayer) yang menggunakan Gameplay cukup unik, Mengapa saya mengatakan hal yang demikian? Karena di server ini berbeda dengan server-server lainnya. Server ini termasuk kedalam DeathMatch mode dan juga TeamDeath-Match mode, karena di server ini ada System Clan.

      Server ini juga menerapkan Melee-weapons War, yaitu perang hanya dengan menggunakan senjata-senjata jarak dekat seperti Knife, Katana, Baseball bat, dan lainnya. Selain itu server ini juga memiliki system-system lain seperti Bank System, Exp System, dan masih banyak lagi.

     Didalam server ini anda dapat meningkatkan level dengan cepat, dan juga kalian bisa bertempur tanpa batas. Server ini bisa terbilang unik karena adanya system Rage. Apakah itu? Itu adalah sebuah system yang hanya dapat di gunakan oleh player berlevel tinggi. System ini akan otomatis memperkuat daya tahan penggunanya, dengan begini anda akan merasa seperti orang yang sangat kuat.

Jika kalian penasaran, coba lah lihat Trailer dari Scuffle World Online berikut ini

((COMING SOON))

Sekian dari saya, bagi para pencinta SA-MP cobalah untuk masuk kedalam server ini saat pembukaan perdananya di 2013 nanti, jangan lupa!!

11 Juni, 2012

PAWNO Programming | A kick command with mirror system for SA-MP.

Hallo guys..
Today I'm going to show you the tutorial of Kick Command, okay let's prepare the materials first.
ZCMDsscanf, then a_samp.
Okay now types this on top of your script
#include <a_samp>
#include <Zcmd>
#include <sscanf>
As I was told you before, these means we've added plugins into your server, let's go on
Okay let's type this after that one
enum pDetails{
         Admin
};
new pInfo[MAX_PLAYERS][pDetails];


Type this on bottom of your script

CMD:kick(playerid, params[])
{
       new targetid, reason, msg[240], name[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
       if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: /kick [playerid] [reason]");
       if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: Player doesn't connect");

Those words means, if the ID's wrong or invalid ID, they gonna eject the acess
Okay let's continue this script

       if(pInfo[playerid][Admin] < pInfo[id][Admin])
       {
                SendClientMessage(playerid, [YOUR COLOR], "MIRROR: Trying to kick higher admin level");
                Kick(playerid);
       }

Nah this is the MIRROR, if the level of id higher that the player id or the commander, they'll continue the acess of command, but it goes to the commander oir playerid

       else
       {
                 GetPlayerName(playerid, aname, sizeof(aname));
                 GetPlayerName(id, name, sizeof(name));
                 format(msg, 240, "Administrator %s has just kicked %s, with reason: %s", aname, name, reason);
                 SendClientMessageToAll([YOURCOLOR], msg);
                 Kick(id);
        }
    return 1;
}

Nah this is the last, it'll kick your target, then infrom all players about this news.
Then this's the complete parts

#include <a_samp>
#include <Zcmd>
#include <sscanf>
enum pDetails{
         Admin
};
new pInfo[MAX_PLAYERS][pDetails];

CMD:kick(playerid, params[])
{
       new targetid, reason, msg[240], name[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
       if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: /kick [playerid] [reason]");
       if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: Player doesn't connect");
        if(pInfo[playerid][Admin] < pInfo[id][Admin])
       {
                SendClientMessage(playerid, [YOUR COLOR], "MIRROR: Trying to kick higher admin level");
                Kick(playerid);
       }
        else
       {
                 GetPlayerName(playerid, aname, sizeof(aname));
                 GetPlayerName(id, name, sizeof(name));
                 format(msg, 240, "Administrator %s has just kicked %s, with reason: %s", aname, name, reason);
                 SendClientMessageToAll([YOURCOLOR], msg);
                 Kick(id);
        }
    return 1;
}


Okay that's all what i want to share with you guys today, see you later then have good luck ;)
See you later, in next discussion :D

Best regards, Ryu

09 Juni, 2012

How to play Grand Theft Auto: San Andreas IN ONLINE

Hallo guys..
Today I'll tell you how to play GTA SA in online, online means multiplayer so you'll not meet a BOT like in offline. Okay let's go.

If you want to play it in online, first you must have GTA San Andreas files, it's like GTA_SA.exe and the others. Alright next material is SAMP setup, you can download it over HERE .

Alright, you must run the setup, then install it. You can follow the instruction from the setup..

I hope you guys how don't know about San Adreas Multiplayer, play it now..
Okay guys that's all I want to share with you now, next post might be An Admin command in SAMP Server, see you. Big thanks for all of SA-MP crews cause those guys have been created it.

Best Regrads, Ryu.

PAWNO Programming | A simple admin script for SA-MP.

Hallo guys..

Where ever you're, hope you're in fine condition, okay let's go to the point.

In this script, we need ZCMD , sscanf , and a_samp absolutely, haha.

Okay let's begin...

firstly, you must type this on top of your script

#include <a_samp>
#include <Zcmd>
#include <sscanf>

Okay we've included the plugins, and then type this under of that words

enum pDetails {
       Admin
};
new pInfo[MAX_PLAYERS][pDetails];

Alright now, we can create the CMDs. Type this on bottom of your script

CMD:setadmin(playerid, params[])
{
      new id, level, msg[240], aname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
      if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, [YOUR COLOR], "COMMAND: /setadmin [playerid] [level]");


It means you've set how the command gonna work, so they shall get your target id by the numbers you've typed, and the level too. Okay let's continue this.

     if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: Player doesn't connect");

It means, if your target hasn't connect they'll denied your command following that reason, okay go on.

   if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: You're not an admin");

Okay I'll explain it. It means only RCON Admin can acess this command, so you must logged in as an admin to promote someone.

    else
    {
           GetPlayerName(playerid, aname, sizeof(aname));
           GetPlayerName(id, name, sizeof(name));
           format(msg, sizeof(msg), "Administrator %s has just promoted %s[%d] to be an admin level %d", aname, name, id, level);
           SendClientMessageToAll([YOURCOLOR], msg);
           pInfo[id][Admin] = level;
    }
  return 1;
}

Okay I'm going to explain it guys, haha. It means this part gonna get your name, and your target name too. Then it'll inform all players about this news, then set your target being an admin quickly :D

In complete parts

CMD:setadmin(playerid, params[])
{
      new id, level, msg[240], aname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
      if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, [YOUR COLOR], "COMMAND: /setadmin [playerid] [level]");
       if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: Player doesn't connect");
       if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, [YOURCOLOR], "COMMAND: You're not an admin");
       else
      {
           GetPlayerName(playerid, aname, sizeof(aname));
           GetPlayerName(id, name, sizeof(name));
           format(msg, sizeof(msg), "Administrator %s has just promoted %s[%d] to be an admin level %d", aname, name, id, level);
           SendClientMessageToAll([YOURCOLOR], msg);
           pInfo[id][Admin] = level;
      }
  return 1;
}

At last you've done a CMD, okay guys thanks for visiting my blog, i'll post the other CMD, see you.
Byee...

Best regrads, Ryu