need help on /ask
#1

hi,its not showing the question to Admin just say your question sent to oline admins!
Here my code

Код:
COMMAND:ask(playerid,params[])
{
    new text[128];
    if(sscanf(params, "s[128]", text))SendClientMessage(playerid, 0xAA3333AA, "Usage: /ask [Text]");
    SendClientMessage(playerid,0xAA3333AA,"Your question has been sent to online admins!");
    new Name[MAX_PLAYER_NAME], KickMessage[128];
    GetPlayerName(playerid, Name, sizeof(Name));
    if(APlayerData[playerid][PlayerLevel] >= 2)format(KickMessage, sizeof(KickMessage), "[Question]:%s(%d):%s", Name, playerid,text);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) == 0) SendClientMessage(i,0xAA3333AA, KickMessage);
    }
    return 1;
}
Reply
#2

This should be works

Код:
COMMAND:ask(playerid,params[])
{
    new string[128];
    if(sscanf(params, "s[128]", params))return SendClientMessage(playerid, 0xAA3333AA, "Usage: /ask [Text]");
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(string, sizeof(string), "[Question]:%s(%d):%s", Name, playerid,params);
    for(new i = 0; i < MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && APlayerData[playerid][PlayerLevel] >= 2 ) SendClientMessage(i,0xAA3333AA, string);
    }
    SendClientMessage(playerid,0xAA3333AA,"Your question has been sent to online admins!");
    return 1;
}
Reply
#3

Quote:
Originally Posted by Jewell
Посмотреть сообщение
This should be works

Код:
COMMAND:ask(playerid,params[])
{
    new string[128];
    if(sscanf(params, "s[128]", params))return SendClientMessage(playerid, 0xAA3333AA, "Usage: /ask [Text]");
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(string, sizeof(string), "[Question]:%s(%d):%s", Name, playerid,params);
    for(new i = 0; i < MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && APlayerData[playerid][PlayerLevel] >= 2 ) SendClientMessage(i,0xAA3333AA, string);
    }
    SendClientMessage(playerid,0xAA3333AA,"Your question has been sent to online admins!");
    return 1;
}
Ty it work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)