/helpchat and /endhelpchat only for ID 0
#1

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;
}
Reply


Messages In This Thread
/helpchat and /endhelpchat only for ID 0 - by lulo356 - 09.02.2015, 23:42
Re: /helpchat and /endhelpchat only for ID 0 - by Jefff - 10.02.2015, 00:40
Re: /helpchat and /endhelpchat only for ID 0 - by lulo356 - 10.02.2015, 01:17
Re: /helpchat and /endhelpchat only for ID 0 - by Jefff - 10.02.2015, 01:52
Re: /helpchat and /endhelpchat only for ID 0 - by Kar - 10.02.2015, 02:18
Re: /helpchat and /endhelpchat only for ID 0 - by lulo356 - 10.02.2015, 06:33
Re: /helpchat and /endhelpchat only for ID 0 - by lulo356 - 10.02.2015, 16:46
Re: /helpchat and /endhelpchat only for ID 0 - by Sime30 - 10.02.2015, 17:00
Re: /helpchat and /endhelpchat only for ID 0 - by lulo356 - 11.02.2015, 09:33
Re: /helpchat and /endhelpchat only for ID 0 - by lulo356 - 11.02.2015, 22:19

Forum Jump:


Users browsing this thread: 2 Guest(s)