[Not Resloved] Commands calling other commands
#1

When I type /serverstats it calls /sethp
And when I type /dropgun it calls /kill
And /kill calls /skill

They are all in different parts of the script, at different distances between commands.
However, what would cause this to happen?
I am using the Pawn.cmd plugin.
However, it does the same thing with ZCMD.
I have way to many commands to list them all, so I'm looking for some general causes for this particular situation.

I am not using any alias either.
No commands are redirected to anther command. (I.E /sethealth and /sethp)
I deleted all alias in my script to see if that was the culprit with no result.

PHP код:
CMD:kill(playeridparams[])
{
    
SetPlayerHealth(playerid0);
    return 
1;

PHP код:
CMD:logscreen(playeridparams[])
{
    switch(
P_Info[playerid][LogScreen])
    {
        case 
0:
        {
            
P_Info[playerid][LogScreen] = 1;
            
SendClientMessage(playerid, -1" >> Login screen enabled ");
        }
        case 
1:
        {
            
P_Info[playerid][LogScreen] = 0;
            
SendClientMessage(playerid, -1" >> Login screen disabled ");
        }
        default:
        {
            
P_Info[playerid][LogScreen] = 0;
            
SendClientMessage(playerid, -1" >> Login screen disabled ");
        }
    }
    return 
1;

PHP код:
CMD:serverstats(playeridparams[])
{
    new 
string[128];
    
SCM(playeridCOL_WHITE"|__________________________[SERVER STATS]__________________________|");
    
format(stringsizeof(string), "Streamer Loaded: Objects: ({3399FF}%d{FFFFFF}) | Pickups: ({3399FF}%d{FFFFFF}) | 3D Text Labels: ({3399FF}%d{FFFFFF})",
    
CountDynamicObjects(),CountDynamicPickups(), CountDynamic3DTextLabels());
       
SCM(playeridCOL_WHITEstring);
    
format(stringsizeof(string), "Player Stats: Logins: ({3399FF}%d{FFFFFF}) | Registered: ({3399FF}%d{FFFFFF}) | Connections: ({3399FF}%d{FFFFFF})",\
    
TotalLoginTotalRegisterTotalConnect);
    
SCM(playeridCOL_WHITEstring);
    
format(stringsizeof(string), "Server Stats: Autobans: ({3399FF}%d{FFFFFF}) | Vehicles: ({3399FF}%d{FFFFFF}) "TotalAutoBanVehiclesLoaded);
    
SCM(playeridCOL_WHITEstring);
    
SCM(playeridCOL_WHITE"|__________________________________________________________________|");
    return 
1;

Findings:
When I add this; No commands work at all:
PHP код:
public OnPlayerCommandPerformed(playeridcmd[], params[], resultflags)
{
    if(
result == -1)
    {
        print(
"Something");
        return 
0;
    }
    print(
"Something two");
    return 
1;
}
public 
OnPlayerCommandReceivedplayeridcmd[ ], params[ ], flags )
{
    print(
"Something four");
    return 
0;

However, when removed Commands work, but call the wrong command.
I.E
/dropgun calls /kick Command.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)