15.09.2012, 17:36
pawn Код:
CMD:answerhelpme(playerid, params[])
{
new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
if(PlayerInfo[playerid][Helperlevel] < 1) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command ");
if(sscanf(params,"u", id)) return SendClientMessage(playerid, COLOR_SYNTAX," [SYNTAX]: /answerhelpme [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]: Player not connected");
else
{
if(PlayerNeedsHelp[id] == 1)
{
PlayerNeedsHelp[id] = 0;
GetPlayerName(playerid,sendername,sizeof(sendername));
GetPlayerName(id,name,sizeof(name));
format(string, sizeof(string), "**[INFO]: [ID:%d] %s has accepted your help and now ready to assist you! Please be patience.", playerid, sendername);
SendClientMessage(id, GREEN, string);
}
else return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]: This player did not ask for help! [Wrong ID]");
}
return 1;
}
Anyone ?..
btw, here's the Helpme command :
pawn Код:
CMD:helpme(playerid, params[])
{
new string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], id;
if(isnull(params)) return SendClientMessage(playerid, COLOR_SYNTAX,"[SYNTAX]: /helpme [Description]");
GetPlayerName(playerid,sendername,sizeof(sendername));
GetPlayerName(id,name,sizeof(name));
format(string,sizeof(string),"[INFO]: %s has requested for help: %s", sendername, params);
HBroadCast(ORANGE,string,1);
SendClientMessage(playerid, GREEN,"[INFO]: You have requested for help, please wait for a reply");
PlayerNeedsHelp[id] = 1;
return 1;
}