SA-MP Forums Archive
[Tutorial] Annnounce admin system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Annnounce admin system (/showthread.php?tid=533684)



Annnounce admin system - Banga - 25.08.2014

Hello,

Today we are going to learn has to create a system of announcement admin.

Sorry for my english, i'm french.

pawn Код:
dcmd_adan(playerid,params[]) // dcmd command
{
    new string[128]; // string
    if(!strlen(params)) // If there is a message has to announce (call params)
    {
        SendClientMessage(playerid,COLOR_USAGE,"USAGE: /adannounce (Message)"); // If settings is not present = SendClientMessage
        return 1; // return
    }
    format(string,sizeof(string),"%s",params); // %s an element of sscanf is which allows us to reveal the message (params)
    GameTextForAll(string,5000,0); // Send string in GameTextForAll
    return 1; // return
}
Thank you for the time and consideration.

Sorry for my english.


Re : Annnounce admin system - streetpeace - 26.08.2014

Good tutorial for newbies.


Re: Annnounce admin system - Younes44 - 26.08.2014

Good Job xD


Re : Annnounce admin system - Banga - 26.08.2014

Thank you


Re: Annnounce admin system - Raaf - 30.08.2014

Its a good basic tutorial, but for the newbies you should tell them that they need dcmd.


Re: Annnounce admin system - Stinged - 30.08.2014

Why don't you just use params instead of creating a new string and formatting it?
pawn Код:
GameTextForAll(params,5000,0);