09.02.2015, 23:42
This command works only for ID 0 what do i need to do
pawn Код:
CMD:helpchat(playerid, params[])
{
static
userid,
text[128];
if (sscanf(params, "s[128]", text))
return SendSyntaxMessage(playerid, "/helpchat [message]");
if(ahelpchat[playerid] == 0)
return SendErrorMessage(playerid, "You are not in a chat with an staff member");
if(ahelpchat[playerid] == 1)
SendClientMessageEx(userid, COLOR_YELLOW, "(( Helpchat %s: %s ))", ReturnName(playerid, 0), text);
SendClientMessageEx(playerid, COLOR_YELLOW, "(( Helpchat %s: %s ))", ReturnName(userid, 0), text);
return 1;
}
CMD:endhelpchat(playerid, params[])
{
static
userid;
if(!PlayerData[playerid][pAdmin] && !PlayerData[playerid][pHelper] && !PlayerData[playerid][pMod])
return SendErrorMessage(playerid, "You are not an staff member");
ahelpchat[userid] = 0;
ahelpchat[playerid] = 0;
SendClientMessageEx(userid, COLOR_YELLOW, "Staff Member %s has ended the HelpChat", ReturnName(playerid, 0));
SendClientMessageEx(playerid, COLOR_YELLOW, "You have ended the HelpChat between you and %s", ReturnName(userid, 0));
return 1;
}