how to send message to only certain person
#1

How do i send a message only to a certain team? So like...say someones types

/mechanic, it will search for any online mechanics and if there are none online, it will say "No mechanics on right now" If there is, it will say

{Player who typed mechanic} needs a mechanic, his location is [location of that person]

How can i do this?
Reply
#2

lets just say your using the var new mechanic[MAX_PLAYERS];

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) {
if(mechanic[i] == 1){
SendClientMessage(i,colour,"msg");
}
}
Reply
#3

Quote:
Originally Posted by [LL
InstabiC ]
lets just say your using the var new mechanic[MAX_PLAYERS];

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) {
if(mechanic[i] == 1){
SendClientMessage(i,colour,"msg");
}
}
Can you explain this? i'm not a pro scripter or anything...

how do i make this work so if someone types /mechanic it sends me a message (if im a mechanic)

{Player who typed mechanic} needs a mechanic, his location is [location of that person]
Reply
#4

Quote:
Originally Posted by killdahobo99
Quote:
Originally Posted by [LL
InstabiC ]
lets just say your using the var new mechanic[MAX_PLAYERS];

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) {
if(mechanic[i] == 1){
SendClientMessage(i,colour,"msg");
}
}
Can you explain this? i'm not a pro scripter or anything...

how do i make this work so if someone types /mechanic it sends me a message (if im a mechanic)

{Player who typed mechanic} needs a mechanic, his location is [location of that person]
You'll really need very basic coding skills to make something like this work.
If you don't know what to do with the code InstabiC provided, please start on something easier and read the documentation.
Reply
#5

Quote:
Originally Posted by Woet
Quote:
Originally Posted by killdahobo99
Quote:
Originally Posted by [LL
InstabiC ]
lets just say your using the var new mechanic[MAX_PLAYERS];

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) {
if(mechanic[i] == 1){
SendClientMessage(i,colour,"msg");
}
}
Can you explain this? i'm not a pro scripter or anything...

how do i make this work so if someone types /mechanic it sends me a message (if im a mechanic)

{Player who typed mechanic} needs a mechanic, his location is [location of that person]
You'll really need very basic coding skills to make something like this work.
If you don't know what to do with the code InstabiC provided, please start on something easier and read the documentation.
Well reading documentation about the wrong topic won't get me anywhere. This is the scripting discussion, not "go help yourself"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)