23.04.2017, 17:42
hey guys,
the command is compiling successful, but when i use it in the server (/setclan is working, *example: /setclan 0 test is not working, it says Unknown Command).
i would be thankful if you`ll help me to resolve the problem...
btw sorry for my English, i`m still learning it.
the command is compiling successful, but when i use it in the server (/setclan is working, *example: /setclan 0 test is not working, it says Unknown Command).
i would be thankful if you`ll help me to resolve the problem...
btw sorry for my English, i`m still learning it.
PHP Code:
if(!strcmp(cmd,"/SetClan", true))
{
if(DOF2_GetInt(GetAdminFile(playerid),"IsAdmin")==0) return UnKnownCommand;
if(DOF2_GetInt(GetAdminFile(playerid),"AdminLevel") < 1) return SendClientMessage(playerid,COLOR_RED,"/SetClan - азшай чмарйн");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "/SetClan [ID] [Clan] :цешъ щйоещ");
id = strval(tmp);
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_RED, "!айгй щвей");
if(DOF2_IsSet(PClanFile(playerid), "InClan")) return SendClientMessage(playerid, COLOR_RED, ".щзчп жд лбш роца бчмап");
tmp1 = strtok(cmdtext, idx);
if(!strlen(tmp1)) return SendClientMessage(playerid, COLOR_WHITE, "/SetClan [ID] [Clan] :цешъ щйоещ");
format(ClanFile, sizeof(ClanFile), "Players/Clans/%d.txt", CNameByID(DOF2_GetString(PClanFile(playerid),"Clan")));
DOF2_SetInt(ClanFile, "ClanPlayers", DOF2_SetInt(ClanFile, "ClanPlayers") +1);
DOF2_SetInt(PClanFile(playerid), "ClanLevel", 1);
DOF2_SetString(PClanFile(id), "Clan", tmp1);
new String[128];
format(String, sizeof (String), "{FFFFFF}%s {00AFFF}ам ъек дчмап {FFFFFF}%s {00AFFF}длрсъ аъ дщзчп", DOF2_GetInt(PClanFile(playerid), "Clan"), GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, String);
// new String[128];
format(String, sizeof (String), "{FFFFFF}%s {00AFFF}длрйс аеък ам дчмап {FFFFFF}%s {00AFFF}ордм дчмарйн", DOF2_GetInt(PClanFile(playerid), "Clan"), GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, String);
return 1;
}