Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: KylinZhang on March 02, 2013, 12:23:08 pm

Title: Help me!Come in !
Post by: KylinZhang on March 02, 2013, 12:23:08 pm
i need help !
What can i do? Add to rules this command

plz help me ~
Title: Re: Help me!Come in !
Post by: sseebbyy on March 02, 2013, 12:37:06 pm
You mean to add a command that give you the server's rules ?
If yes, you have just to add some SendClientMessage to a command:

Code: [Select]
else if(strcmp(cmd, "rules", true) == 0) {
          SendClientMessage(playerid,COLOR_RED,"Here put the first server's rule");
          SendClientMessage(playerid,COLOR_RED,"Here put the second server's rule");
          SendClientMessage(playerid,COLOR_RED,"Here put the third server's rule");
return 1;
}

If you want to add more than 3 rules, just add more SendClientMessage after the last.

SendClientMessage function:
Code: [Select]
SendClientMessage(playerid,color,text);
playerid = the player ID of that player that will receive the text
color = the color of the text. 
(NOTE:In this version of VC:MP, if you will send a yellow text, and after that a red one, the yellow text will be red too. Is a bug.)
text = the text that will be sent.
Title: Re: Help me!Come in !
Post by: KylinZhang on March 02, 2013, 02:54:34 pm
sorry 2 errors
Title: Re: Help me!Come in !
Post by: sseebbyy on March 02, 2013, 03:49:29 pm
sorry 2 errors

Errors ? :| In this simple command ? Or I forget how to do a simple command, or you didn't understand.

Show me.

PS: I took a look again at the command and I don't see anything wrong...
Title: Re: Help me!Come in !
Post by: JaVeD on March 02, 2013, 03:56:22 pm
lol then i thing he is using sql and putting pawn command haha kylinzhang what server u r using ? i thing he have mistake in color code add this in color COLOR_GREEN
Title: Re: Help me!Come in !
Post by: dream on March 03, 2013, 11:59:54 am
use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]
Title: Re: Help me!Come in !
Post by: KylinZhang on March 10, 2013, 02:07:16 pm
use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]


 error 054: unmatched closing brace
error 010: invalid function or declaration
error 010: invalid function or declaration
Title: Re: Help me!Come in !
Post by: USA.Ghost on March 10, 2013, 05:33:12 pm
i need help !
What can i do? Add to rules this command

plz help me ~

WTF WTF WTF????? NOONE KNOWS SUCH A SIMPLE CMD?????????? Here

[pawn]public OnPlayerText(playerid, cmdtext)
{
new cmd;
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "!rules", true) == 0) {
SendClientMessageToAll(0xFFFFFF,"1st line of rules");// 0xFFFFFF = COLOR RED
SendClientMessageToAll(0xFFFFFF,"2nd line of rules");
SendClientMessageToAll(0xFFFFFF,"3rd line of rules");
SendClientMessageToAll(0xFFFFFF,"4th line of rules");
//make more if you want more lines, make less if you want less lines
return 1;
}
return 1;//DO NOT RETURN 0 OR ELSE THE MESSAGE WILL NOT BE SENT(EVERYONE WILL BE MUTED)
}[/pawn]

and you who posted wrong ones, GO LEARN TO SCRIPT!
Title: Re: Help me!Come in !
Post by: dream on March 11, 2013, 05:36:00 pm
use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]


 error 054: unmatched closing brace
error 010: invalid function or declaration
error 010: invalid function or declaration
have errors? i think you didn't understand.
Title: Re: Help me!Come in !
Post by: Fire_Head on March 17, 2013, 12:23:03 pm
Man its work
Title: Re: Help me!Come in !
Post by: dynavolt71 on March 26, 2013, 08:28:27 am
Did You put
Code: [Select]
#include <a_vcmp>You Put it ?

Or

You May Put That On "OnPlayerCommandText"
To Find "OnPlayerCommandText"
Press "Ctrl (Control) + F"
And Copy Paste The "OnPlayerCommandText"
And Paste The Code At There.

use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]
Sorry You Wrong
it Should Be :
on Top :
[pawn]#define DGREEN            0x04A36BFF[/pawn]
[pawn]
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(DGREEN, "put the first rule");
          SendClientMessageToAll(DGREEN, "put the second rule");
       return 1;
}
[/pawn]
Title: Re: Help me!Come in !
Post by: Pain on March 26, 2013, 01:38:19 pm
Did You put
Code: [Select]
#include <a_vcmp>You Put it ?

Or

You May Put That On "OnPlayerCommandText"
To Find "OnPlayerCommandText"
Press "Ctrl (Control) + F"
And Copy Paste The "OnPlayerCommandText"
And Paste The Code At There.

use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]
Sorry You Wrong
it Should Be :
on Top :
[pawn]#define DGREEN            0x04A36BFF[/pawn]
[pawn]
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(DGREEN, "put the first rule");
          SendClientMessageToAll(DGREEN, "put the second rule");
       return 1;
}
[/pawn]
#define DGREEN
this does not need
Title: Re: Help me!Come in !
Post by: USA.Ghost on March 26, 2013, 04:09:59 pm
Did You put
Code: [Select]
#include <a_vcmp>You Put it ?

Or

You May Put That On "OnPlayerCommandText"
To Find "OnPlayerCommandText"
Press "Ctrl (Control) + F"
And Copy Paste The "OnPlayerCommandText"
And Paste The Code At There.

use this:
[pawn]}
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(COLOR_YELLOW, "put the first rule");
          SendClientMessageToAll(COLOR_YELLOW, "put the second rule");
       return 1;[/pawn]
Sorry You Wrong
it Should Be :
on Top :
[pawn]#define DGREEN            0x04A36BFF[/pawn]
[pawn]
else if (strcmp(cmd, "!rules", true) == 0){
          SendClientMessageToAll(DGREEN, "put the first rule");
          SendClientMessageToAll(DGREEN, "put the second rule");
       return 1;
}
[/pawn]
#define DGREEN
this does not need

DO NOT BUMP OLD TOPICS
Title: Re: Help me!Come in !
Post by: dynavolt71 on March 27, 2013, 11:32:00 am
This Is Old Topic  :o ?
Title: Re: Help me!Come in !
Post by: Pain on March 27, 2013, 01:49:35 pm
em...
Title: Re: Help me!Come in !
Post by: KylinZhang on March 30, 2013, 08:47:59 am
thanks, man