CMD:ask(playerid,params[]) {
new question[128], asker[MAX_PLAYER_NAME], str[128];
if(isnull(params)) return SendClientMessage(playerid, red, "Usage: /ask <question>");
GetPlayerName(playerid, asker, sizeof(asker));
format(str, sizeof(str), "||NewReport|| %s(%d) asks: %s",asker,playerid,question);
MessageToAdmins(COLOR_WHITE,str);
return SendClientMessage(playerid,yellow, "Your question has been sent to online administrators.");
}
CMD:ask(playerid,params[]) {
new question[128], asker[MAX_PLAYER_NAME], str[128];
if(isnull(params)) return SendClientMessage(playerid, red, "Usage: /ask <question>");
GetPlayerName(playerid, asker, sizeof(asker));
format(str, sizeof(str), "||NewReport|| %s(%d) asks: %s",asker,playerid,question);
MessageToAdmins(COLOR_WHITE,str);
SendClientMessage(playerid,yellow, "Your question has been sent to online administrators.");
return 1;
}
CMD:ask(playerid,params[])
{
new question[128], asker[MAX_PLAYER_NAME], str[128];
if(sscanf(params, "s[128]", question)) return SendClientMessage(playerid, red, "Usage: /ask <question>");
GetPlayerName(playerid, asker, sizeof(asker));
format(str, sizeof(str), "||NewReport|| %s(%d) asks: %s",asker,playerid,question);
MessageToAdmins(COLOR_WHITE,str);
SendClientMessage(playerid,yellow, "Your question has been sent to online administrators.");
return 1;
}
or if you dont have sscanf
CMD:ask(playerid,params[])
{
new asker[MAX_PLAYER_NAME], str[128];
if(isnull(params)) return SendClientMessage(playerid, red, "Usage: /ask <question>");
GetPlayerName(playerid, asker, sizeof(asker));
format(str, sizeof(str), "||NewReport|| %s(%d) asks: %s",asker,playerid,params);
MessageToAdmins(COLOR_WHITE,str);
SendClientMessage(playerid,yellow, "Your question has been sent to online administrators.");
return 1;
}
Oh, I didn't notice that you're making the variable "question" but not using it.
pawn Код:
|