08.09.2010, 10:40
I have a problem with my A message Code;
Should allow the admin to type a meesage and send it to the player. This code just shows a space and nothing I told it to.
I had code before where it said " (INFO) Message from Server Administration" but that didnt show what the admin typed. Any ideas as to why it's not working.
Bear in mind I dont know how to fully use DCMD.
pawn Код:
dcmd_amessage(playerid,params[])
{
new id, n[MAX_PLAYER_NAME];
new string[256];
new estring[255];
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!");
if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /amessage <ID> <Messsage>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,GREY,"Invalid ID");
format(string,sizeof(string),"(INFO): Message from Server Administration: %s ",estring);
SendClientMessage(playerid,YELLOW,estring);
return 1;
}
Should allow the admin to type a meesage and send it to the player. This code just shows a space and nothing I told it to.
I had code before where it said " (INFO) Message from Server Administration" but that didnt show what the admin typed. Any ideas as to why it's not working.
Bear in mind I dont know how to fully use DCMD.