making Newb chat and others /b /o
#1

Hello i would like to know how would i make /b /o /newb such as chats in roleplay servers am using includes below


Код:
#include <a_samp>
#include <streamer>
#include <YSI\y_ini>
#include <ZCMD>
Reply
#2

You really should to start learn how to script, this is like the basics of scripting. You make a command like /n then SendClientMessageToAll with the params, I'll help you.

pawn Код:
CMD:newbie(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /newbie [chat]"); // Checking if params is empty or not
    {
        new string[150], name[MAX_PLAYER_NAME]; // defining our variables, our string to send and the playername
        GetPlayerName(playerid, name, sizeof(name)); //getting the playerid's name
        format(string,sizeof(string),"[Newbie] %s: %s", name, params); // Just formatting our string here
        SendClientMessageToAll(-1, string); // Sending the string to everyone
    }
    return 1; // just because we have to
}
I guess you can figure out /b & /o
Reply
#3

thanks for helpping and yes am a start of learning scripting and i read samp wike but nothing there about commands like this anyways thanks for being helpful
Reply
#4

I know SA-MP wiki isn't the best. I learned it by just experimenting with it, really. It's oke if you come here if you got any errors, but you need to try first. You can't just ask people to script a code for you . It doesn't matter if you get errors or not, I used to get errors all the time when I scripted a command. You learn from it and how to avoid them.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)