ZCMD + /PM
#1

Okay, I have tried some stuff but can't get it working. I need a /pm id text command for zcmd :/. I also have the sscanf2 so that can be used if it's easier to do it with it.
Reply
#2

What have you tried so far? Show me some code.
Reply
#3

Well I tried with some sscanf stuff but It failed, so I deleted all of it already and came here asking for help.
Reply
#4

Well, uh ... have a look around in some game-modes for examples. I'd show you one from my own game-mode but it is very advanced and has lots of stuff in it that's specific to my game-mode only.
Reply
#5

Код:
CMD:pm(playerid, params[])
{
new id,str[80],txt[80],name[20];
GetPlayerName(playerid, name, 20);
if(sscanf(params,"us[80]",id,txt)) return SendClientMessage(playerid,-1,"Use: /pm [id] [txt]");
format(str,80,"PM,Sender: %s: Txt: %s",name,txt);
SendClientMessage(id,-1,str);
return true;
}
try this
Reply
#6

Use this:
pawn Код:
// PM Command.
CMD:pm( playerid, params[ ] )
{
    new pID, Message[129], string[128];
    if(sscanf(params, "us[129]", pID, Message)) return SendClientMessage(playerid, -1, "/pm <id> [message]");
    else
    {
        if(pID == (0xFFFF)) return SendClientMessage(playerid, -1,"Player not connected!");
        if(pID == playerid ) return SendClientMessage(playerid, -1,"You cannot PM yourself!");
        format(string,sizeof(string),"PM Sent To %s (%d): %s", pName(pID), pID, Message);
        SendClientMessage(playerid, -1, string);
        format(string,sizeof(string),"PM From %s (%d): %s", pName(playerid), playerid, Message);
        SendClientMessage(pID, -1, string);
    }
    return 1;
}
// On Bottom of your script.
stock pName(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}
Reply
#7

Or use the filterscript in my siggy.
Reply
#8

Or don't........ Ad clicks are for retards.

Just take my advice. If you really are stuck, PM me and I will help you make one.
Reply
#9

Quote:
Originally Posted by Famalamalam
Посмотреть сообщение
Or don't........ Ad clicks are for retards.

Just take my advice. If you really are stuck, PM me and I will help you make one.
Sorry for off topic:
Giving doesn't always mean not hoping for feedback.
And guess what? Yes I'm a retard but it have nothing to do with what you said.
Reply
#10

I'm sorry but I didn't really understand what you said. If you want some off-topic please send me a private message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)