public OnPlayerText(playerid, text[])
{
new name[MAX_PLAYER_NAME], msg[128];
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "%s: [%d] %s", name, playerid, text);
SendClientMessageToAll(playerid, msg);
return 0;
}
SendClientMessageToAll(color, const message[]);
C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : error 017: undefined symbol "color" C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : error 029: invalid expression, assumed zero C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : error 017: undefined symbol "message" C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
It shows me error:
Код:
C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : error 017: undefined symbol "color" C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : error 029: invalid expression, assumed zero C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : error 017: undefined symbol "message" C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(4810) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
SendClientMessageToAll(playerid, msg);
SendClientMessageToAll(-1, msg);
Yes, thank you, but what I should do if I want the name color sent to SendClientMessageToAll.
Like this: Xian: [0] Test *Black = White in server. Someone: [1] Hello! |
public OnPlayerText(playerid, text[])
{
new name[MAX_PLAYER_NAME], msg[128];
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "%s:{FFFFFF} [%d] %s", name, playerid, text);
SendClientMessageToAll(0x44FF00FF, msg);
return 0;
}
CMD:cmds(playerid,params[])
{
new string[512];
format(string, sizeof(string),"/kill - Suicide\n/car - Spawns a car\n/tcar - Spawns a pre-tuned car\n/fix - Fix a car\n/nos - Add nitrous on your car\n/xnos - Remove nitrous from your car\n/godcar - Make the car god\n/teles - Teleports\n/updates - Check the current update\n/website - Our forum!\n/gps - Find the player\n/setmytime - Set your time\n/radio - Play radio\n/music(2) - Play music\n/stop - Stop everything that you're playing\n/pc - Parachute.\n/respawn - Respawn\n/healme - Heal yourself (free)");
ShowPlayerDialog, playerid, 1, DIALOG_STYLE_MSGBOX, "Commands", string, "OK", "");
return 1;
}
C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(5308) : error 075: input line too long (after substitutions) C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(5311) : error 076: syntax error in the expression, or invalid function call C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(5311) : error 029: invalid expression, assumed zero C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(5311) : warning 215: expression has no effect Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
CMD:cmds2(playerid,params[])
{
new string[512];
new longstring[512];
format(string, sizeof(string),"/kill - Suicide\n/car - Spawns a car\n/tcar - Spawns a pre-tuned car\n/fix - Fix a car\n/nos - Add nitrous on your car\n");
strcat(longstring,string,sizeof(longstring));
format(string, sizeof(string),"/xnos - Remove nitrous from your car\n/godcar - Make the car god\n/teles - Teleports\n/updates - Check the current update\n/website - Our forum!\n");
strcat(longstring,string,sizeof(longstring));
format(string, sizeof(string),"/gps - Find the player\n/setmytime - Set your time\n/radio - Play radio\n/music(2) - Play music\n/stop - Stop everything that you're playing\n");
strcat(longstring,string,sizeof(longstring));
format(string, sizeof(string),"/pc - Parachute\n/respawn - Respawn\n/healme - Heal yourself (free)");
strcat(longstring,string,sizeof(longstring));
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Commands", longstring, "OK", "");
return 1;
}
Change it to this:
pawn Код:
|
SendClientMessageToAll(GetPlayerColor(playerid), msg);