01.02.2014, 05:52
How to make Anti SPAM for PM ? thanks
Код:
CMD:pm(playerid,params[]) { if(PmDialog == 1) { new id; if(sscanf(params, "u", id)) return SendClientMessage(playerid, lighterblue, "Usage: /pm <PlayerID/Part of Nick>"); if(IsPlayerConnected(id)) { pInfo[playerid][Clicked] = id; format(Jstring,sizeof(Jstring),"PM To %s(ID: %d) Type you message:", GetName(id), id); return ShowPlayerDialog(playerid,DIALOG_PRIVATE_MESSAGE,DIALOG_STYLE_INPUT,"Private Message",Jstring,"Send","Cancel"); } else return ShowMessage(playerid, red, 2); } else { new id,Message[128]; if(sscanf(params, "us[128]",id, Message)) return SendClientMessage(playerid, lighterblue, "Usage: /pm <PlayerID/Part of Nick> <Message>"); if(IsPlayerConnected(id)) { return OnPrivateMessage(playerid, id, Message); } else return ShowMessage(playerid, red, 2); } }