Commands not working
#1

When i go in server commands are not working.

I got only this - http://www.bildites.lv/images/akwt6vqcr47xc8sz2v4t.png
Reply
#2

Is this for every command? I guess so. Have you checked in OnPlayerText or OnPlayerCommandText.
Reply
#3

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    return 
1;

Yes that is for every command
Reply
#4

Make it return 0 then see what happens.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 0;
}
EDIT: Has this worked?
Reply
#5

Still the same
Reply
#6

What include are using to create this commands with? zcmd? d_cmd?
Reply
#7

PHP код:
#include <ZCMD> 
Reply
#8

Have you modified it? Have you done anything to your OnPlayerCommandText?

Please show me your command which is not working.
Reply
#9

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.
Reply
#10

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
successSendClientMessageEx(playeridCOLOR_WHITE"Unknown command. Please use /help to list all available commands.");
    return 
1;
}

public 
OnPlayerCommandReceived(playeridcmdtext[])
{
    
playerLastTyped[playerid] = 0;
    
printf("[zcmd] [%s]: %s"GetPlayerNameEx(playerid), cmdtext);
    if(
gPlayerLogged{playerid} != 1)
    {
        
SendClientMessageEx(playeridCOLOR_RED"You are not logged in.");
        return 
0;
    }
    if(
GetPVarInt(playerid"LoadingObjects") == 1)
    {
        
SendClientMessageEx(playeridCOLOR_GRAD2"You can't do this right now.");
        return 
0;
    }
    if(
PlayerInfo[playerid][pMuted] == 1)
    {
        
SendClientMessageEx(playeridCOLOR_GREY"You cannot speak, you have been silenced!");
        return 
0;
    }
    if(
CommandSpamUnmute[playerid] != 0)
    {
        if(
PlayerInfo[playerid][pAdmin] < 2)
        {
            
SendClientMessage(playeridCOLOR_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(playeridCOLOR_YELLOW"You have been muted automatically for spamming. Please wait 10 seconds and try again.");
            
SetTimerEx("OtherTimerEx"1000false"ii"playeridTYPE_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(playeridCOLOR_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 >= && i_period >= 3) {
                new 
string[128];
                
format(string,sizeof(string),"Warning: %s may be server advertising: '%s'."GetPlayerNameEx(playerid),cmdtext);
                
SendAdminMessage(COLOR_REDstring);
                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(playeridcmdtext[])
{

    return 
0;

YOu can check
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)