20.02.2013, 20:30
Well here I am again, (sorry xd) This time, something weird is happening, I made a sctrcmp scripty, but it seems like it doesnt work. When I use the /mail command ig, it shows name to search for, and names found, identical the same. However, the strcmp clientmessage doesn't get activated. Been searching on it for some time now, but I can't seem to find it.
Declaration
this one is to give every mailbox a unique ID.
command
Why do I need this for? Simply, I gotta find if the player who i'm trying to send a message has a mailbox.
Declaration
Code:
enum MAIL_BOX{ bool:Owned, Owner[MAX_PLAYER_NAME], Messages } new gMAIL_BOX[MAX_MAILBOXES][MAIL_BOX];
Code:
new MailBoxid; //unique id
Code:
CMD:mail(playerid, params[]) { new toplayer; if(!sscanf(params, "u", toplayer)) { * * new name[MAX_PLAYER_NAME], string[256]; * * GetPlayerName(toplayer, name, sizeof(name)); *format(string, sizeof(string), "name to search for : %s", name); * *SendClientMessage(playerid, COLOR_WHITE, string); * * for(new i=0;i<MailBoxid;i++) * * { * * *format(string, sizeof(string), "Owner : %s", gMAIL_BOX[i][Owner]); * * * * * *SendClientMessage(playerid, COLOR_WHITE, string); * * * * * *if(strcmp(name, gMAIL_BOX[i][Owner], true)) * * * * * *{ * * * * * * * *SendClientMessage(playerid, COLOR_WHITE, "FFFFFFFFFOUNDDDDDDDDDDDDDDD"); * } *} } else SendClientMessage(playerid, COLOR_WHITE, "USAGE: '/sendmail [Name]'"); return 1; }