Commands not working -
FaZeRs - 16.02.2014
When i go in server commands are not working.
I got only this -
http://www.bildites.lv/images/akwt6vqcr47xc8sz2v4t.png
Re: Commands not working -
Sledgehammer - 16.02.2014
Is this for every command? I guess so. Have you checked in OnPlayerText or OnPlayerCommandText.
Re: Commands not working -
FaZeRs - 16.02.2014
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
Yes that is for every command
Re: Commands not working -
Sledgehammer - 16.02.2014
Make it return 0 then see what happens.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
EDIT: Has this worked?
Re: Commands not working -
FaZeRs - 16.02.2014
Still the same
Re: Commands not working -
Sledgehammer - 16.02.2014
What include are using to create this commands with? zcmd? d_cmd?
Re: Commands not working -
FaZeRs - 16.02.2014
Re: Commands not working -
ACI - 16.02.2014
Have you modified it? Have you done anything to your OnPlayerCommandText?
Please show me your command which is not working.
Re: Commands not working -
Sledgehammer - 16.02.2014
OnPlayerCommandPerformed - Got anything in this function? If so please post it here. Else I don't really know what to do.
EDIT: ACI his already said this happens to ALL commands.
Re: Commands not working -
FaZeRs - 16.02.2014
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessageEx(playerid, COLOR_WHITE, "Unknown command. Please use /help to list all available commands.");
return 1;
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
playerLastTyped[playerid] = 0;
printf("[zcmd] [%s]: %s", GetPlayerNameEx(playerid), cmdtext);
if(gPlayerLogged{playerid} != 1)
{
SendClientMessageEx(playerid, COLOR_RED, "You are not logged in.");
return 0;
}
if(GetPVarInt(playerid, "LoadingObjects") == 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You can't do this right now.");
return 0;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "You cannot speak, you have been silenced!");
return 0;
}
if(CommandSpamUnmute[playerid] != 0)
{
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_WHITE, "You are muted from submitting commands right now.");
return 0;
}
}
if(PlayerInfo[playerid][pAdmin] < 2)
{
CommandSpamTimes[playerid]++;
if(CommandSpamTimes[playerid] == 5)
{
CommandSpamTimes[playerid] = 0;
CommandSpamUnmute[playerid] = 10;
SendClientMessageEx(playerid, COLOR_YELLOW, "You have been muted automatically for spamming. Please wait 10 seconds and try again.");
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_FLOODPROTECTION);\
return 0;
}
}
/*Compares last string with current, if the same, alert the staff only on the 3rd command. (Expires after 5 secs)
if(PlayerInfo[playerid][pAdmin] < 2) {
new laststring[128];
if(GetPVarString(playerid, "LastCommand", laststring, 128)) {
if(!strcmp(laststring, cmdtext, true)) {
CommandSpamTimes[playerid]++;
if(CommandSpamTimes[playerid] == 2) {
CommandSpamTimer[playerid] = 30;
CommandSpamTimes[playerid] = 0;
new string[128];
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is spamming with: %s", GetPlayerNameEx(playerid), playerid, cmdtext);
ABroadCast(COLOR_YELLOW, string, 2);
}
}
}
SetPVarString(playerid, "LastCommand", cmdtext);
}*/
if(strfind(cmdtext, "|", true) != -1)
{
SendClientMessageEx(playerid, COLOR_RED, "You cannot use the '|' character in commands.");
return 0;
}
if(PlayerInfo[playerid][pAdmin] < 2)
{
if(strfind(cmdtext, ":", true) != -1)
{
new
i_numcount,
i_period,
i_pos;
while(cmdtext[i_pos]) {
if('0' <= cmdtext[i_pos] <= '9') i_numcount++;
else if(cmdtext[i_pos] == '.') i_period++;
i_pos++;
}
if(i_numcount >= 8 && i_period >= 3) {
new string[128];
format(string,sizeof(string),"Warning: %s may be server advertising: '%s'.", GetPlayerNameEx(playerid),cmdtext);
SendAdminMessage(COLOR_RED, string);
return 0;
}
}
}
/*new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Spectate[i] == playerid)
{
format(STRING, "%s performed command: %s", GetPlayerNameEx(playerid), cmdtext);
SendClientMessageEx(GettingSpectated[playerid], COLOR_LIGHTBLUE, string);
}
}
if(GettingSpectated[playerid] != 999)
{
new string[128];
format(STRING, "%s performed command: %s", GetPlayerNameEx(playerid), cmdtext);
SendClientMessageEx(GettingSpectated[playerid], COLOR_LIGHTBLUE, string);
}*/
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
YOu can check