16.06.2012, 20:40
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);
SendClientMessage(playerid, COLOR_AQUA, string);
format(string, sizeof(string), "-| %s(%d) has asked a question | Question: %s |-", pName, playerid, params);
SendClientMessage(i, COLOR_AQUA, string);
return 0;
}
else SendClientMessage(playerid, COLOR_RED, "ERROR: There are no helpers online to help.");
}
}
}
return 1;
}