Command problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command problem (
/showthread.php?tid=299540)
Command problem -
xalyy - 26.11.2011
Hello!
On my server when I type a command like /stats or something the server shut down immediately.
How can I fix it?
Thanks
Re: Command problem -
sabretur - 26.11.2011
Type here your code, then all clear will be.
Re: Command problem -
Mr_Scripter - 26.11.2011
show you /stats command
This forum requires that you wait 120 seconds between posts. Please try again in 20 seconds.
Re: Command problem -
Kostas' - 26.11.2011
Look at your code, it might crashed for something worng there is on this.
Re: Command problem -
xalyy - 26.11.2011
This is my OnPlayerCommandText:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new x_job[256];
new string[256];
new playermoney;
if(AdminDuty[playerid] == 1) SetPlayerChatBubble(playerid, "Admin szolgбlatban", COLOR_LIGHTBLUE,20,1200);
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
new idcar = GetPlayerVehicleID(playerid);
new rapstyle, wankstyle, stripstyle, dancestyle, sexstyle, bjstyle;
cmd = strtok(cmdtext, idx);
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s: ID:%d CMD: %s", giveplayer, playerid, cmdtext);
CMDLog(string);
if(RegistrationStep[playerid] > 0)
{
SmallLifeMessage(playerid, COLOR_LIGHTRED, " Nem tudod ezt csinбlni jelenleg !");
return 1;
}
if(BenchPresses[playerid] != 0)
{
SmallLifeMessage(playerid, COLOR_LIGHTRED, "Nem tudod hasznбlni ezt amikor padon vagy.");
return 1;
}
Re: Command problem -
xalyy - 26.11.2011
So what I need to do to fix it?
Re: Command problem -
Joshb93 - 26.11.2011
You have a infinite loop in your script, try removing this
pawn Код:
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s: ID:%d CMD: %s", giveplayer, playerid, cmdtext);
CMDLog(string);
Re: Command problem -
xalyy - 26.11.2011
And If i remove what it does?
I removed but it keeps shutting down ;(
Re: Command problem -
Joshb93 - 26.11.2011
It should remove the loop, if there is one, just try..
Re: Command problem -
xalyy - 26.11.2011
I removed but it keeps shutting down ;(