SA-MP Forums Archive
Need help for command - 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)
+--- Thread: Need help for command (/showthread.php?tid=488093)



Need help for command - ultrAslan - 16.01.2014

Hi there.

I need a /changelog command that show what have been changed after the update .

Can you help me please.


Re: Need help for command - BarFix - 16.01.2014

pawn Код:
CMD:changelog(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFAA, "*****************************************");
    SendClientMessage(playerid, 0xFFFFFFAA, "Your title here"");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
*****************************************");
    return 1;
}



AW: Re: Need help for command - ultrAslan - 16.01.2014

Quote:
Originally Posted by BarFix
Посмотреть сообщение
pawn Код:
CMD:changelog(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFAA, "*****************************************");
    SendClientMessage(playerid, 0xFFFFFFAA, "Your title here"");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, COLOR_GREEN, "
*****************************************");
    return 1;
}
thank you and mus i add this on OnPlayerCommandText?


Re: AW: Re: Need help for command - BarFix - 16.01.2014

Quote:
Originally Posted by ultrAslan
Посмотреть сообщение
thank you and mus i add this on OnPlayerCommandText?
depends if you're using ZCMD.. Your commands like "CMD:..."?

or like this:
pawn Код:
if(strcmp(cmd, "/commandhere", true) == 0) {
If that like this above me, then use this onplayercommandtext.
pawn Код:
if(strcmp(cmd, "/changelog", true) == 0) {
{
SendClientMessage(playerid, 0xFFFFFFAA, "*****************************************");
    SendClientMessage(playerid, 0xFFFFFFAA, "Your title here"");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
*****************************************");
    return 1;
}
or

pawn Код:
else if(strcmp(cmdtext, "changelog", true) == 0)
        {
    SendClientMessage(playerid, 0xFFFFFFAA, "*****************************************");
    SendClientMessage(playerid, 0xFFFFFFAA, "Your title here"");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
*****************************************");
        return 1;
    }
Don't forget to rep+


AW: Re: AW: Re: Need help for command - ultrAslan - 16.01.2014

Quote:
Originally Posted by BarFix
Посмотреть сообщение
depends if you're using ZCMD.. Your commands like "CMD:..."?

or like this:
pawn Код:
if(strcmp(cmd, "/commandhere", true) == 0) {
If that like this above me, then use this onplayercommandtext.
pawn Код:
if(strcmp(cmd, "/changelog", true) == 0) {
{
SendClientMessage(playerid, 0xFFFFFFAA, "*****************************************");
    SendClientMessage(playerid, 0xFFFFFFAA, "Your title here"");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
*****************************************");
    return 1;
}
or

pawn Код:
else if(strcmp(cmdtext, "changelog", true) == 0)
        {
    SendClientMessage(playerid, 0xFFFFFFAA, "*****************************************");
    SendClientMessage(playerid, 0xFFFFFFAA, "Your title here"");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
* Text Here!");
    SendClientMessage(playerid, 0xFFFFFFAA, "
*****************************************");
        return 1;
    }
Don't forget to rep+
can you make a filterscript of this please? i get every time errors when i put this in my gamemode.


Re: Need help for command - [TMS]Legena - 16.01.2014

Код:
CMD:changelog(playerid, params[])
{
    SendClientMessage(playerid, 0xFF000000, "____________________________________________");
    SendClientMessage(playerid, 0xFFFFFFFF, "Last updates:");
    SendClientMessage(playerid, 0xFFFFFFFF, "Add your text Here!");
    SendClientMessage(playerid, 0xFFFFFFFF, "Add your text Here!");
    SendClientMessage(playerid, 0xFFFFFFFF, "Add your text Here!");
    SendClientMessage(playerid, 0xFFFFFFFF, "Add your text Here!");
    SendClientMessage(playerid, 0xFF000000, "____________________________________________");
    return 1;
}
This needs to work but you need to write your last updates manually here.


Re: Need help for command - KhaledElkhourashi - 16.01.2014

http://pastebin.com/ZfHn1uNh


Re: Need help for command - [TMS]Legena - 16.01.2014

Same as mine xD Just added in script. At last thsi guy need to cut it from script to paste in his own So my way is faster and easier. And thank you for reputation guys.


AW: Need help for command - ultrAslan - 17.01.2014

i have an last question how i can put this in a infobox ?

like this in the picture . when a player do /changelog that a box will opened but only with a okay button.




Re: Need help for command - Konstantinos - 17.01.2014

ShowPlayerDialog and style DIALOG_STYLE_MSGBOX

Quote:
Originally Posted by iOxide
Посмотреть сообщение
Its easy,

pawn Код:
CMD:changelog(playerid, params[])
{
    new Msg[500];

    format(Msg, "%sAdd your text Here!\n", Msg);
    format(Msg, "%sAdd your text Here!\n", Msg);
    format(Msg, "%sAdd your text Here!\n", Msg);
    format(Msg, "%sAdd your text Here!\n", Msg);
    format(Msg, "%sAdd your text Here!", Msg);
    ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_MSGBOX, "Update Info", Msg, "Close", " ");
    return 1;
}
Neither the declaration of an array, nor the format function is needed.