13.02.2014, 21:25
hey all , i have this cmd by me and there is a problem in it i can't fix it the cmd is
and everytime i type the cmd without the id and text it show me:
but when i try to pm my friend it show this :
i hope you guys help me in it
Код:
if (strcmp("/nopm", cmdtext, true, 10) == 0||strcmp("/NOPM", cmdtext, true, 10) == 0) { #pragma unused cmdtext if(GetPVarInt(playerid,"NoPM") == 1) { SetPVarInt(playerid,"NoPM",0); SendClientMessage(playerid,0xFFFF00FF,"Pm's on!"); } else { SetPVarInt(playerid,"NoPM",1); SendClientMessage(playerid,0xFFFF00FF,"Pm's off!"); } return 1; } if (strcmp("/pm", cmdtext, true, 10) == 0||strcmp("/PM", cmdtext, true, 10) == 0) { new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME]; if(sscanf(cmdtext[8], "u", id, str2)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm [ID] [MESSAGE]"); if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, COLOR_RED, "Player No Connected"); if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You Cannot PM Yourself!"); if(GetPVarInt(id,"NoPM") == 1) return SendClientMessage(playerid,0xFF0000FF,"That player isnt recieving pm's"); GetPlayerName(playerid, Name1, sizeof(Name1)); GetPlayerName(id, Name2, sizeof(Name2)); format(str, sizeof(str), "PM To %s: %s", Name2, id, str2); SendClientMessage(playerid, 0xFF0000FF, str); format(str, sizeof(str), "PM From %s: %s", Name1, playerid, str2); SendClientMessage(id, 0xFF0000FF, str); return 1; }
Quote:
/pm [ID] [MESSAGE] |
Quote:
SERVER: Unknown Command |