[FilterScript] Simple PM
#1

Simple PM By Tanush
Hey guys i made /pm [id] [message] for people that doesn't know how to make /pm. I used zcmd and sscanf for this.


Special Thanks to Zeex (ZCMD)
Another Thanks to ****** (sscanf)


Fixed the problem find by CyperGhost
PasteBin >> http://pastebin.com/5Yv7QUig
Download >> http://www.mediafire.com/?n0620ciwhi0nc69

Guys if you see bugs just don't try to avoid it, tell me so i could fix it next update.
Reply
#2

Nice
Reply
#3

Nice And Cool
Reply
#4

DELETED
Reply
#5

Quote:
Originally Posted by Cosmo Bulthuis
Посмотреть сообщение
It's simple and nice! 7.5/10
thanks why not 10/10 xD?
Reply
#6

pawn Код:
CMD:pm(playerid, params[])
{
        if(togglepm[ID] == 0) return SendClientMessage(playerid,0xff0000ff,"ERROR: That user has is pm to toggle off");
        if(sscanf(params,"us",ID,message)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /pm [ID] [message]");
        if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
        GetPlayerName(ID,Pname,sizeof(Pname));
        GetPlayerName(playerid,Nam,sizeof(Nam));
        format(str,sizeof(str),"You had send a message to %s",Pname);
        SendClientMessage(playerid,0xFF9900AA,str);
        format(str,sizeof(str),"%s Send you a PM: %s",Nam,message);
        SendClientMessage(ID,0xFF9900AA,str);
        return 1;
}
pawn Код:
//You have this before the sscanf line.. so im pretty sure the 'ID' will return as 0
if(togglepm[ID] == 0)
Reply
#7

togglepm works, it doesnt return as 0... it says ERROR: that person has toggle pm off if someone has it off
Reply
#8

Try to run a test, use printf
pawn Код:
CMD:pm(playerid, params[])
{
    if(togglepm[ID] == 0) return SendClientMessage(playerid,0xff0000ff,"ERROR: That user has is pm to toggle off");
    printf("Player ID: %d", ID);
    if(sscanf(params,"us",ID,message)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /pm [ID] [message]");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
    GetPlayerName(ID,Pname,sizeof(Pname));
    GetPlayerName(playerid,Nam,sizeof(Nam));
    format(str,sizeof(str),"You had send a message to %s",Pname);
    SendClientMessage(playerid,0xFF9900AA,str);
    format(str,sizeof(str),"%s Send you a PM: %s",Nam,message);
    SendClientMessage(ID,0xFF9900AA,str);
    return 1;
}
My results:
/pm 0 hi
/pm 1 hey
/pm 2 hello there

Код:
Player ID: 0
Player ID: 0
Player ID: 0
As you can see it always return 0, no matter ID you send the pm to
Reply
#9

Simple but nice.
Reply
#10

I need an IRC channel i don't know much about it thou
Reply
#11

simple and easy but nice.
Reply
#12

Thank you guys
Reply
#13

Quote:
Originally Posted by Kerlan
Посмотреть сообщение
I need an IRC channel i don't know much about it thou
what the fuck has that got to do with the topic? Also, this is another one of those pm systems. I would always prefer garpm over this
Reply
#14

GarPM doesnt exist now, garsion delete his account i think
Reply
#15

Sounds nice I think I will use it for my server..

Edit: Downlod link don't work.
Reply
#16

I fixed the download link, if you get that problem again just reply again that download link is not working then copy the pastebin
Reply
#17

Quote:
Originally Posted by CyberGhost
Посмотреть сообщение
Try to run a test, use printf
pawn Код:
CMD:pm(playerid, params[])
{
    if(togglepm[ID] == 0) return SendClientMessage(playerid,0xff0000ff,"ERROR: That user has is pm to toggle off");
    printf("Player ID: %d", ID);
    if(sscanf(params,"us",ID,message)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /pm [ID] [message]");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
    GetPlayerName(ID,Pname,sizeof(Pname));
    GetPlayerName(playerid,Nam,sizeof(Nam));
    format(str,sizeof(str),"You had send a message to %s",Pname,message); // <<<< He forgot the message. -_-
    SendClientMessage(playerid,0xFF9900AA,str);
    format(str,sizeof(str),"%s Send you a PM: %s",Nam,message);
    SendClientMessage(ID,0xFF9900AA,str);
    return 1;
}
My results:
/pm 0 hi
/pm 1 hey
/pm 2 hello there

Код:
Player ID: 0
Player ID: 0
Player ID: 0
As you can see it always return 0, no matter ID you send the pm to
Fixed for you
Reply
#18

Quote:
Originally Posted by Region123
Посмотреть сообщение
Fixed for you
dude i forgot about that and fixed it long time
Reply
#19

Me gelly fag
I wanted to release one but People pwn me :P
Reply
#20

I downloaded it today and tryd it very good!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)