SA-MP Forums Archive
need help with a Cmd (rep ++) - 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 with a Cmd (rep ++) (/showthread.php?tid=372946)



need help with a Cmd (rep ++) - Geeboi_Mehdi - 28.08.2012

i want the Cmd That When U Do /Announce Text
So if i do /Announce Hey Whats Up Players
It Shows In the Players Screen i Want is Style 3
Thank you If U helped


Re: need help with a Cmd (rep ++) - Akira297 - 28.08.2012

There is a tutorial about this command.

Here is a Tutorial About Your Request



Re: need help with a Cmd (rep ++) - ThePhenix - 28.08.2012

Try it:
It will be for admins!


pawn Код:
CMD:announce(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 4 || IsPlayerAdmin(playerid)) {//Delete it if you don't want it for admins.
        if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        CMDMessageToAdmins(playerid,"ANNOUNCE");
        return GameTextForAll(params,4000,3);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be level 4 to use this command");
}



Re: need help with a Cmd (rep ++) - Geeboi_Mehdi - 28.08.2012

Really? Were Can U give me Link?


Re: need help with a Cmd (rep ++) - Akira297 - 28.08.2012

I already listed but here

: https://sampforum.blast.hk/showthread.php?tid=372460


Re: need help with a Cmd (rep ++) - Geeboi_Mehdi - 28.08.2012

Hey ThePhenix what if i want to delete The Message You Need to Be level 4 to use This Command


Re: need help with a Cmd (rep ++) - ThePhenix - 28.08.2012

Use it:

pawn Код:
CMD:announce(playerid,params[]) {
        if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        return GameTextForAll(params,4000,3);
}



Re: need help with a Cmd (rep ++) - Akira297 - 28.08.2012

Код:
CMD:announce(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) {//Delete it if you don't want it for admins.
        if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        CMDMessageToAdmins(playerid,"ANNOUNCE");
        return GameTextForAll(params,4000,3);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be level 4 to use this command");
}
- ThePhenix owns this command but, I modified for his request.
--

There you go, broski


Re: need help with a Cmd (rep ++) - Lordzy - 28.08.2012

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

CMD:announce(playerid,params[])
{
  new text[60];
  if(sscanf(params,"s[60]",text))
  return SendClientMessage(playerid, 0xFF0000, "Usage:/announce [text]");
  GameTextForAll(text,3000,3);
  return 1;
}
As Akira said,the tutorial is more better if you wanna learn it.


Re: need help with a Cmd (rep ++) - ThePhenix - 28.08.2012

This is the normal code.
Everyone will be allowed to use this command:
pawn Код:
CMD:announce(playerid,params[]) {
        if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        return GameTextForAll(params,4000,3);
}
If you want for admins do as I posted before.