SA-MP Forums Archive
screen massege - 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: screen massege (/showthread.php?tid=328993)



screen massege - Semo - 26.03.2012

hello all

i want for admins to make a screen massege to all players as sacnr do

in sacnr server admin can make a screen massege to all players as

hi all
j ur so stupid
etc

only admins from level 1 and up

command

/screenmsg (the massege)

then it will appear in all players screen

thnx


Re: screen massege - NewerthRoleplay - 26.03.2012

I think this would be scripting discussion not server support because that implies that you are having a error message come up on your server. All scripting questions must go in that section :P


Re: screen massege - Semo - 26.03.2012

ok thank u


Re: screen massege - Plastic - 26.03.2012

you can use this :

pawn Код:
dcmd(screenmsg,9,cmdtext);
pawn Код:
dcmd_screenmsg(playerid,params[])
{
    {
        if(!strlen(params)) return
        SendClientMessage(playerid, COLOR_CYAN, "Usage: /screenmsg [Text]") &&
        SendClientMessage(playerid, COLOR_ORANGE, "Function: Will Announce the specified Message in screen");
        return GameTextForAll(params,4000,3);
    }
}



Re: screen massege - Semo - 26.03.2012

is it send to all players??

and admins can only??


Re: screen massege - Plastic - 26.03.2012

Well if you want only admins to use it use the following :

pawn Код:
dcmd(screenmsg,9,cmdtext);
pawn Код:
dcmd_screenmsg(playerid,params[])
{
        if(AdminLevel[playerid] >= 1) //change AdminLevel to how you defined the accounts on your script
    {
        if(!strlen(params)) return
        SendClientMessage(playerid, COLOR_CYAN, "Usage: /screenmsg [Text]") &&
        SendClientMessage(playerid, COLOR_ORANGE, "Function: Will Announce the specified Message in screen");
        return GameTextForAll(params,4000,3);
    }
}



Re: screen massege - Semo - 26.03.2012

where do i put it in wich line in pwno?


Re: screen massege - Plastic - 26.03.2012

if your using dcmd then put :

pawn Код:
dcmd(screenmsg,9,cmdtext);
with the list of commands

and put :

pawn Код:
dcmd_screenmsg(playerid,params[])
{
        if(AdminLevel[playerid] >= 1) //change AdminLevel to how you defined the accounts on your script
    {
        if(!strlen(params)) return
        SendClientMessage(playerid, COLOR_CYAN, "Usage: /screenmsg [Text]") &&
        SendClientMessage(playerid, COLOR_ORANGE, "Function: Will Announce the specified Message in screen");
        return GameTextForAll(params,4000,3);
    }
}
under the other commands


Re: screen massege - Semo - 26.03.2012

only admin level 1??

i did it

its not working im admin level 1337

im the owner

pls i want all admins do screen msg to all players


Re: screen massege - MP2 - 26.03.2012

Look in an existing admin filterscript.