that admis read the pm"s
#4

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Make a function, don't make a stock.

If you need only for this command:
PHP код:
CMD:pm(playerid,params[])
{
    if(
Player[playerid][Mute] == true) return SendClientMessage(playerid, -1"{FFFFFF}Error: {0099FF}You are muted, STFU.");
    new 
recieveridtext[180];
    
#if PLUGINS == 1
        
if(sscanf(params,"is[180]",recieveridtext)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
    
#else
        
if(sscanf(params,"is",recieveridtext)) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/pm [Player ID] [Text]");
    
#endif
    
if(!IsPlayerConnected(recieverid)) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}Player not connected.");
    new 
String[180];
    
format(String,sizeof(String),"{66CC00}*** PM from %s (%d): %s",Player[playerid][Name], playeridtext);
    
SendClientMessage(recieverid,-1,String);
    
format(String,sizeof(String),"{66CC00}*** PM to %s (%d): %s"Player[recieverid][Name], recieveridtext);
    
SendClientMessage(playerid,-1,String);
    
PlayerPlaySound(recieverid,1054,0,0,0);
    
    for(new 
ii<MAX_PLAYERSi++)
    {
        if(!
IsPlayerConnected(i)) continue;
        if(!
IsPlayerAdmin(i)) continue;
        
format(String,sizeof(String),"{66CC00}*** PM from %s to %s (%d): %s",Player[playerid][Name], Player[recieverid][Name], recieveridtext);
        
SendClientMessage(playerid,-1,String);
    } 
By the way I don't know why you store player's name with this
PHP код:
Player[recieverid][Name
instead of GetPlayerName(...).
Well depends on the coder because i just make a stock because ive sendadminmessage all over in my script.
Reply


Messages In This Thread
that admis read the pm"s - by vegaltasendai - 26.06.2016, 21:32
Re: that admis read the pm"s - by WhiteGhost - 26.06.2016, 21:34
Re: that admis read the pm"s - by Dayrion - 27.06.2016, 02:09
Re: that admis read the pm"s - by WhiteGhost - 27.06.2016, 02:50
Re: that admis read the pm"s - by Sithis - 27.06.2016, 05:37
Re: that admis read the pm"s - by PrO.GameR - 27.06.2016, 11:04
Re: that admis read the pm"s - by Infinity - 27.06.2016, 11:15
Re: that admis read the pm"s - by Vince - 27.06.2016, 11:58
Re: that admis read the pm"s - by Sithis - 27.06.2016, 13:01
Re: that admis read the pm"s - by Infinity - 27.06.2016, 13:05

Forum Jump:


Users browsing this thread: 4 Guest(s)