[VORTEX GM] How to change local OOC chat. -
Clueless - 03.05.2011
Hello, as the title says, I want to change /b to ( only for example when you say (hi, it happears (( hi )) but whenever I try to make it, it gives me errors, could you help me out please?
heres the /b
Код:
command(b, playerid, params[])
{
new Message[128], string[128];
if(sscanf(params, "z", Message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(strlen(Message) < 1 || !IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), "%s says: ((%s)) ", GetName(playerid), Message);
NearByMessage(playerid, WHITE, string);
}
}
}
return 1;
}
Re: [VORTEX GM] How to change local OOC chat. -
admantis - 03.05.2011
Could you at least show us the errors, dude.
Re: [VORTEX GM] How to change local OOC chat. -
Clueless - 03.05.2011
Well whenever I try to do best I can like,
Код:
command( (, playerid, params[])
{
new Message[128], string[128];
if(sscanf(params, "z", Message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(strlen(Message) < 1 || !IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), "%s says: ((%s)) ", GetName(playerid), Message);
NearByMessage(playerid, WHITE, string);
}
}
}
return 1;
}
or
Код:
command:(, (playerid, params[])
{
new Message[128], string[128];
if(sscanf(params, "z", Message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(strlen(Message) < 1 || !IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), "%s says: ((%s)) ", GetName(playerid), Message);
NearByMessage(playerid, WHITE, string);
}
}
}
return 1;
}
it fails
Re: [VORTEX GM] How to change local OOC chat. -
Laronic - 03.05.2011
pawn Код:
if(sscanf(params, "z", Message)) //From
if(sscanf(params, "s[128]", Message)) //To
idk if it solves the errors, because i dont know the errors
Re: [VORTEX GM] How to change local OOC chat. -
Clueless - 03.05.2011
This is what I got
Код:
C:\Documents and Settings\diingO\Ambiente de trabalho\SM-RPG V.1.0 R1\gamemodes\SM-RPG.pwn(15577) : error 010: invalid function or declaration
C:\Documents and Settings\diingO\Ambiente de trabalho\SM-RPG V.1.0 R1\gamemodes\SM-RPG.pwn(29133) : warning 203: symbol is never used: "command"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Код:
15577: command((, playerid, params[])
Re: [VORTEX GM] How to change local OOC chat. -
Clueless - 03.05.2011
Please
Re: [VORTEX GM] How to change local OOC chat. -
ScopE iMarkx - 03.05.2011

do
pawn Код:
command(b, playerid, params[])
Re: [VORTEX GM] How to change local OOC chat. -
Laronic - 03.05.2011
Quote:
Originally Posted by ScopE iMarkx
 do
pawn Код:
command(b, playerid, params[])
|

it will fail, because you have to type COMMAND in caps
anyway try this one (not tested)
pawn Код:
COMMAND:b(playerid, params[])
{
if(Player[playerid][PrisonID] == 1) return SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
else if(strlen(params) > 0)
{
new string[128];
format(string, sizeof(string), "%s says: ((%s))", GetName(playerid), params);
NearByMessage(playerid, WHITE, string);
}
else SendClientMessage(playerid, 0xFF0000FF, "SYNTAX: /b [message]");
return 1;
}
Re: [VORTEX GM] How to change local OOC chat. -
Clueless - 03.05.2011
But I dont want B mate, I already had B, I want to change /b to ( only for example when you say (hi, it happears (( hi )) thats why its ( there -.-
Re: [VORTEX GM] How to change local OOC chat. -
Laronic - 03.05.2011
You mean if you do "/hi" then the message (( Hi )) will appear to near by players