05.06.2012, 14:44
Ok its JHelpersSystem
If you answer to XX and you send message on the chat (F6 > MESSAGE) just you and him see that
I do that but if I send message on the chat its send me the tow messages : Player (MY NICK) : XXXX
Helper (MY NICK): XXXX
and if the id write its write me : Player (His nick):XXX
Helper (his nick) : XXXx
This is the code:
and :
I can help please?
If you answer to XX and you send message on the chat (F6 > MESSAGE) just you and him see that
I do that but if I send message on the chat its send me the tow messages : Player (MY NICK) : XXXX
Helper (MY NICK): XXXX
and if the id write its write me : Player (His nick):XXX
Helper (his nick) : XXXx
This is the code:
PHP Code:
public OnPlayerText(playerid, text[])
{
if(HelperChat[playerid] == 1)
{
format(str,sizeof(str),"[HelperChat] Helper %s[%d]: %s",GetName(playerid),playerid,text);
SendClientMessage(Player,Orange,str);
if(HelperChat[id] == 1)
{
format(str,sizeof(str),"[HelperChat] Player %s[%d]: %s",GetName(playerid),playerid,text);
SendClientMessage(Helper,Orange,str);
return 0;
}
}
PHP Code:
if(strcmp(tmp, "ACcept", true) == 0 || strcmp(tmp, "AC", true) == 0)
{
if(SetPlayerHelperLevel(playerid) < 1 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,White,"аъд ма бцееъ дъойлд");
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,yellow," /HElpMe ACcept [ID] :цешъ щйоещ");
id = strval(tmp);
if(PlayerHelp[id] == 0) return SendClientMessage(playerid,White,"щзчп жд ма бйчщ бчщъ тжшд");
format(string,sizeof(string),"айщш мк аъ дбчщд емлп рфъз бйрлн ц'аи айщй %s[%d] ддмфш",GetName(playerid),playerid);
SendClientMessage(id,0x7bd22aff,string);
format(string,sizeof(string),"аъ дбчщд емлп рфъз бйрлн ц'аи айщй %s[%d] айщшъ мщзчп",GetName(id),id);
SendClientMessage(playerid,0x7bd22aff,string);
PlayerHelp[playerid] = 0;
HelperChat[playerid]= 1,HelperChat[id]= 1;
PlayerChat[Player] = 1,HelperChat2[Helper]= 1;
return 1;
}
}
PHP Code:
OnPlayerCommandText
Helper = playerid;
Player = id;
________________________________________________________
PHP Code:
new PlayerChat[MAX_PLAYERS];
new HelperChat2[MAX_PLAYERS];
new Helper;
new Player;