KryptonCnR   -  Nov 11, 2013

Hey All, Me Again, Just Need A Little Help With A IRC to SA-MP Server

I am trying to get my bot to read the script and one part of it works, but the other won't as i am trying to do &cmds and it will display it like and then it will read whatever the cmds.txt has in it to them, but the &cmds on it works just well, any help will be great ! thanks very much for having a look.

on *:text:*&cmds*:#: {
msg $chan !say $read(cmds.txt,n)
}
on *:text:*&cmds *:#: {
msg $chan !say $$2 $read(cmds.txt,n)
}
KilllerX  -  Nov 11, 2013

Exactly the same command besides the second one requires a space.

are you trying to

on *:TEXT:&cmds*:#: {
 if (!$2) { msg # !say $read(cmds.txt,n) }
 else { msg $2 !say $read(cmds.txt,n) }
}

So that you it messages the person? Not sure what you are trying to do with the !say; Not sure what you are trying to do exactly. Maybe an example of it from the IRC?

KryptonCnR  -  Nov 11, 2013

I am trying to get it to display for a SA-MP Server from a IRC in which the first &cmds will display without showing a players name in front of it if someone does &cmds player

So the first one would look like when you do &cmds and then it displays on IRC as well as the game chat itself

!say Commands Are: &swat , &rules , &deathmatch , &complain , &evade , &qta

The second one with the name would look like &cmds and then it displays on IRC as well as the game chat itself

Player my commands are: &Swat , &rules , &deathmatch , &complain , &evade , &qta

But i don't think it can be done since the first &cmds will be read first.

(If you understand what I am trying to achieve from this code) and it needs both the as either side of the &cmds* as well as it will read from the game chat when someone says it in the game as it will trigger from the IRC.

choo-ooza  -  Nov 14, 2013

Hello There,
First Of All $read command can only read 1 line from in one time unless its on loop.
i suggest if you don't have lot of commands to show by bot try the simple way
like msg $chan $nick my command are &Swat, &rules , &deathmatch , &complain , &evade , &qta
now see how its look in you codes.

on :text:&cmds*:#: {
msg $chan $nick my command are &Swat, &rules , &deathmatch , &complain , &evade , &qta
}

i think it may solved your problem. if you got more command in bot try repeat the same line again after changing the command repeatedly like below
on :text:&cmds*:#: {
msg $chan $nick my command are &Swat, &rules , &deathmatch , &complain , &evade , &qta
msg $chan $nick my command are & , & , & , & , & , &
msg $chan $nick my command are & , & , & , & , & , &
}

feel free to contact if any problem

Regards,

KryptonCnR  -  Nov 18, 2013

Thanks very much choo-ooza - that worked very well - thanks very much !

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.