21.04.2012, 13:36
/deletenote wont work.
when im going to /deletenote it say Unknown command
when im going to /deletenote it say Unknown command
Код:
if(strcmp(cmdtext,"/deletenote",true ) ==0) { if(IsPlayerConnected(playerid)) { new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "Command: /deletenote [slot(1-5)]"); return 1; } if(strcmp(x_nr,"1",true) == 0) { if(PlayerInfo[playerid][pNote1s] == 1) { strmid(PlayerInfo[playerid][pNote1], "None", 0, strlen("None"), 255); PlayerInfo[playerid][pNote1s] = 0; SendClientMessage(playerid, COLOR_WHITE, "Note (slot 1) has been deleted successfuly."); } else { SendClientMessage(playerid, COLOR_WHITE, " You don't have a note at slot 1 ! "); } } else if(strcmp(x_nr,"2",true) == 0) { if(PlayerInfo[playerid][pNote2s] == 1) { strmid(PlayerInfo[playerid][pNote2], "None", 0, strlen("None"), 255); PlayerInfo[playerid][pNote2s] = 0; SendClientMessage(playerid, COLOR_WHITE, "Note (slot 2) has been deleted successfuly."); } else { SendClientMessage(playerid, COLOR_WHITE, " You don't have a note at slot 2 ! "); } } else if(strcmp(x_nr,"3",true) == 0) { if(PlayerInfo[playerid][pNote3s] == 1) { strmid(PlayerInfo[playerid][pNote3], "None", 0, strlen("None"), 255); PlayerInfo[playerid][pNote3s] = 0; SendClientMessage(playerid, COLOR_WHITE, "Note (slot 3) has been deleted successfuly."); } else { SendClientMessage(playerid, COLOR_WHITE, " You don't have a note at slot 3 ! "); } } else if(strcmp(x_nr,"4",true) == 0) { if(PlayerInfo[playerid][pNote4s] == 1) { strmid(PlayerInfo[playerid][pNote4], "None", 0, strlen("None"), 255); PlayerInfo[playerid][pNote4s] = 0; SendClientMessage(playerid, COLOR_WHITE, "Note (slot 4) has been deleted successfuly."); } else { SendClientMessage(playerid, COLOR_WHITE, " You don't have a note at slot 4 ! "); } } else if(strcmp(x_nr,"5",true) == 0) { if(PlayerInfo[playerid][pNote5s] == 1) { strmid(PlayerInfo[playerid][pNote5], "None", 0, strlen("None"), 255); PlayerInfo[playerid][pNote5s] = 0; SendClientMessage(playerid, COLOR_WHITE, "Note (slot 5) has been deleted successfuly."); } else { SendClientMessage(playerid, COLOR_WHITE, " You don't have a note at slot 5 ! "); } } else { SendClientMessage(playerid, COLOR_WHITE, " Wrong slot id ! "); return 1; } } return 1; }