16.06.2012, 20:03
OK, I compile it with no errors, but ingame, for example, when i type "/ask Example", it says nothing. But if i just do "/ask", it says "Usage: /ask (Question)".
Code:
Any help here?
Code:
pawn Код:
dcmd_ask(playerid, params[])
{
new string[100];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(!strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Usage: /ask (Your Question)");
else
{ for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][Helper] == 1)
{
if(IsPlayerConnected(i))
{
format(string, sizeof(string), "-| You have successfully asked a question | Question: %s |-", params[1]);
SendClientMessage(playerid, COLOR_AQUA, string);
format(string, sizeof(string), "-| %s(%d) has asked a question | Question: %s |-", pName, playerid, params[1]);
SendClientMessage(i, COLOR_AQUA, string);
return 0;
}
else SendClientMessage(playerid, COLOR_RED, "ERROR: There are no helpers online to help.");
}
}
}
return 1;
}