09.07.2016, 01:35
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 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.
Findings:
When I add this; No commands work at all:
However, when removed Commands work, but call the wrong command.
I.E
/dropgun calls /kick Command.
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 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(playerid, params[])
{
SetPlayerHealth(playerid, 0);
return 1;
}
PHP код:
CMD:logscreen(playerid, params[])
{
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(playerid, params[])
{
new string[128];
SCM(playerid, COL_WHITE, "|__________________________[SERVER STATS]__________________________|");
format(string, sizeof(string), "Streamer Loaded: Objects: ({3399FF}%d{FFFFFF}) | Pickups: ({3399FF}%d{FFFFFF}) | 3D Text Labels: ({3399FF}%d{FFFFFF})",
CountDynamicObjects(),CountDynamicPickups(), CountDynamic3DTextLabels());
SCM(playerid, COL_WHITE, string);
format(string, sizeof(string), "Player Stats: Logins: ({3399FF}%d{FFFFFF}) | Registered: ({3399FF}%d{FFFFFF}) | Connections: ({3399FF}%d{FFFFFF})",\
TotalLogin, TotalRegister, TotalConnect);
SCM(playerid, COL_WHITE, string);
format(string, sizeof(string), "Server Stats: Autobans: ({3399FF}%d{FFFFFF}) | Vehicles: ({3399FF}%d{FFFFFF}) ", TotalAutoBan, VehiclesLoaded);
SCM(playerid, COL_WHITE, string);
SCM(playerid, COL_WHITE, "|__________________________________________________________________|");
return 1;
}
When I add this; No commands work at all:
PHP код:
public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags)
{
if(result == -1)
{
print("Something");
return 0;
}
print("Something two");
return 1;
}
public OnPlayerCommandReceived( playerid, cmd[ ], params[ ], flags )
{
print("Something four");
return 0;
}
I.E
/dropgun calls /kick Command.