need help with a Cmd (rep ++)
#1

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
Reply
#2

There is a tutorial about this command.

Here is a Tutorial About Your Request
Reply
#3

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");
}
Reply
#4

Really? Were Can U give me Link?
Reply
#5

I already listed but here

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

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

Use it:

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

Код:
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
Reply
#9

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)