/pmirc <User>

Started by m1k3, Mar 13, 2016, 02:50 PM

Previous topic - Next topic

m1k3

else if ( cmd == "pmirc" )
{
if (status[ player.ID ].IsReg == false) MessagePlayer(RED+"** [KM-Error]: >> "+ORANGE+"You Need To Registered First!",player);
else if ( status[ player.ID ].IsLogged == false ) MessagePlayer(RED+"** [KM-Error]: >> "+ORANGE+"You Need To Logged-In First!",player);
else if ( !text ) MessagePlayer(ORANGE+"Usage: /" + cmd + " [User] [Message]", player );
else if ( NumTok( text, " " ) < 2 ) MessagePlayer(ORANGE+"Usage: /" + cmd + " [User] [Message]", player );
else {
local user = GetTok( text, " ", 1 );
local msg = GetTok( text, " ", 2, NumTok( text, " " ));
EchoNotice( user, ICOL_LBLUE+"> Private Message from "+ICOL_RED+""+player.Name+""+ICOL_LBLUE+": "+msg );
MessagePlayer( WHITE+"> Sent Message to "+RED+""+user+""+WHITE+": "+msg, player );
}
}

This command was made by me! Because a friend asked me if i could do one!

EK.IceFlake

Error: the index status does not exist
Error: the index EchoNotice does not exist
Error: the index ICOL_LBLUE does not exist
Error: the index ICOL_RED does not exist
Error: the index WHITE does not exist
Error: the index RED does not exist
@ElectriX can u plz help me with these errors? i m sure i just copy paste it exact

Xmair

@NECrystalBlue bro help me pls i founded error aslo yes cant fix bro it @ElectriX error look at pleaze
The index, 'status' , 'Numtok' , 'GetTok' , 'EchoNotice' , 'RED' , 'ORANGE' , 'WHITE' , 'ICOL_LBLUE' and 'ICOL_RED' does not exist. Also, you didn't checked that if the user is there or not.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Cena

I Told @ElectriX Not To Copy And Past Lel.
else if ( cmd == "pmirc" )
{
else if ( !text ) MessagePlayer("Usage: /" + cmd + " [User] [Message]", player );
else {
local user = GetTok( text, " ", 1 );
local msg = GetTok( text, " ", 2, NumTok( text, " " ));
EchoNotice( user,"> Private Message from "+player.Name+": "+msg );
MessagePlayer( > Sent Message to """+user+""": "+msg, player );
}
}
try this and idk what to replace EchoMessage with (EchoMessage is like MessagePlayer it will show to only specified player)
Want To Meet Me Come #Cena At Lunet

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Cena

Quote from: Xmair on Mar 13, 2016, 04:24 PM@Cena expression expected.
Because of this MessagePlayer( > Sent Message to """+user+""": "+msg, player ); Replace it with MessagePlayer(" > Sent Message to "+user+": "+msg, player ); And What U replace EchoMessage with?
Want To Meet Me Come #Cena At Lunet

Xmair

@Cena expression expected. He put an 'else if' in the first place after if ( cmd == "pmirc") {

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

EK.IceFlake

You know that we haven't actually tested it and just pointing out bugs from our first glance, right? Also, EchoNotice is the main function and core of this script... AND IT IS THE ONLY FREAKING FUNCTION YOU DONT HAVE!

Coolkid

me and electrix are working together on a script and this command works prefectly and they r no error in this if u want to test my server is on u can test it i have added this command in it

Coolkid

#9
Quote from: NE.CrystalBlue on Mar 13, 2016, 02:57 PMError: the index status does not exist
Error: the index EchoNotice does not exist
Error: the index ICOL_LBLUE does not exist
Error: the index ICOL_RED does not exist
Error: the index WHITE does not exist
Error: the index RED does not exist
@ElectriX can u plz help me with these errors? i m sure i just copy paste it exact
u have to change the colors it will not work write rgb code intead of colors we r using color names because we have specified it on top of script rest command is fine
join my channel #boss i will pm u

m1k3

#10
Errors Fixed:

else if ( cmd == "pmirc" )
{
if ( !text ) MessagePlayer( "[#FF0000]> Syntax: /" + cmd + " [User] [Message]", player );
else if ( NumTok( text, " " ) < 2 ) MessagePlayer( "[#FF0000]> Syntax: /" + cmd + " [User] [Message]", player );
else {
local user = GetTok( text, " ", 1 );
local msg = GetTok( text, " ", 2, NumTok( text, " " ));
EchoNotice( user, "> Private Message from "+player.Name+": "+msg );
MessagePlayer( "[#79EF06]> Sent Message to [#FF0000]"+user+"[#79EF06]: "+msg, player );
}
}

Any other error reply!

Coolkid

Quote from: ElectriX on Mar 18, 2016, 07:35 PMErrors Fixed:

else if ( cmd == "pmirc" )
{
if ( !text ) MessagePlayer( "[#FF0000]> Syntax: /" + cmd + " [User] [Message]", player );
else if ( NumTok( text, " " ) < 2 ) MessagePlayer( "[#FF0000]> Syntax: /" + cmd + " [User] [Message]", player );
else {
local user = GetTok( text, " ", 1 );
local msg = GetTok( text, " ", 2, NumTok( text, " " ));
EchoNotice( user, "> Private Message from "+player.Name+": "+msg );
MessagePlayer( "[#79EF06]> Sent Message to [#FF0000]"+user+"[#79EF06]: "+msg, player );
}
}

Any other error reply!
Good work

m1k3