getting "unkown command" in /SetClan command, please help -
asafasaf - 23.04.2017
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.
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;
}
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 23.04.2017
up...
thats critical to me guys..
help me please, i would be thankfull!
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 23.04.2017
bump
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 23.04.2017
bump
please guys i need some help
Re: getting "unkown command" in /SetClan command, please help -
MrViolence101 - 23.04.2017
using /strcmp is not the best choice either. Use Zeex command processor.
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 23.04.2017
Quote:
Originally Posted by MrViolence101
using /strcmp is not the best choice either. Use Zeex command processor.
|
I`m prefer strcmp because its the easiest way to scripting for me
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 23.04.2017
bump
Re: getting "unkown command" in /SetClan command, please help -
Sew_Sumi - 23.04.2017
Quote:
Originally Posted by asafasaf
I`m prefer strcmp because its the easiest way to scripting for me
|
It's far simpler and easier to be using ZCMD... Learn that.
Show the top of OnPlayerCommandText.
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
bump
i'll be at home and send you the OnPlayerCommandText
Re: getting "unkown command" in /SetClan command, please help -
edyun - 24.04.2017
It is because of the "/SetClan" write it "/setclan" with small letters inside the gamemode.
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
Quote:
Originally Posted by edyun
It is because of the "/SetClan" write it "/setclan" with small letters inside the gamemode.
|
thats exactly what i`m doing, yet not working
Re: getting "unkown command" in /SetClan command, please help -
Sew_Sumi - 24.04.2017
Quote:
Originally Posted by asafasaf
thats exactly what i`m doing, yet not working
|
He's saying he thinks the code in the script needs to be all lowercase.
Code:
if(!strcmp(cmd,"/setclan", true))
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
there is my OnPlayerCommandText public
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256],idx,Cstring[1000],id;
new tmp2[256],tmp1[256],tmp[256],file[256],text[256],str[256],vehicleid = GetPlayerVehicleID(playerid);
cmd = strtok(cmdtext, idx);
SetPVarInt(playerid, "NoAB", 1);
if(DOF2_GetInt(GetAdminFile(playerid),"AdminLevel")!=11)
{
format(Cstring,sizeof(Cstring),"Player \"%s\" [id: %d] cmd: \"%s\"",GetName(playerid),playerid,cmdtext);
for(new p; p < MAX_PLAYERS; p ++)
{
if(IsPlayerConnected(p) && DOF2_GetInt(GetAdminFile(p), "AdminLevel") > 0 && SeeCmd[p] == 1)SendClientMessage(p,COLOR_LIGHTBLUE,Cstring);
}
}
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
bump
Re: getting "unkown command" in /SetClan command, please help -
DarkSkull - 24.04.2017
PHP Code:
if(DOF2_GetInt(GetAdminFile(playerid),"IsAdmin")==0) return UnKnownCommand;
What is UnKnownCommand? Do you define it? Show us what it is.
Also
Quote:
Originally Posted by Y_Less
Bumping a topic in which you have or require further information is allowed after at least 24 hours.
|
Re: getting "unkown command" in /SetClan command, please help -
edyun - 24.04.2017
Change inside the script "/SetClan" to "/setclan" , that is what I meant.
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
delete
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
UnKnown Command means that when a non admin player tries to do this command, he gets Unkown Message, but after I removed this line, the Unknown command keeps show up, so its not the problem.
changing to /setclan infront of /SetClan haven`t worked
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
bump
Re: getting "unkown command" in /SetClan command, please help -
asafasaf - 24.04.2017
bump