SA-MP Forums Archive
Unknown command. - 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: Unknown command. (/showthread.php?tid=451089)



Unknown command. - SumX - 15.07.2013

Hello guys.I scripted my server last summer and now I restarted scripting it.I compiled it into 0.3x and till than,many things are not working properly.
One of them is,for example this command ( there are more commands with same behaviour ):

Код:
CMD:clubkick( playerid, params[ ] )
{
 	if ( GetPVarInt( playerid, "AdminLevel" ) < 2 )
	    return SendClientMessage( playerid, -1, "You must be an "AdminLevel2"{FFFFFF} to team kick someone.");

 	if ( sscanf( params, "us[80]", params[ 0 ], params[ 1 ] ) )
	    return SendClientMessage( playerid, -1, "Usage: /clubkick [id] [reason]");

	if ( !IsPlayerConnected( params[ 0 ] ) )
	    return SendClientMessage( playerid, -1, ""COLOR_RED"Player is not connected");


    if(GetPVarInt(params[ 0 ],"Club") == 1)
    {
		HitmanM--;
		SaveTeamLimits();
		new string[ 128 ];
		format(string, sizeof(string), "%s "BLUESV"has been Club kicked by "REDSV"%s "BLUESV"[Reason: "REDSV"%s"BLUESV"]",pName(params[ 0 ]),pName(playerid), params[ 1 ]);
	    SendClientMessageToAll(REDS, string);

		SetPVarInt(params[ 0 ],"Club",0);
		SpawnPlayer(params[ 0 ]);
    }
    else if(GetPVarInt(params[ 0 ],"Club") == 2)
    {
		NFSM--;
		SaveTeamLimits();
		new string[ 128 ];
		format(string, sizeof(string), "%s "BLUESV"has been Club kicked by "REDSV"%s "BLUESV"[Reason: "REDSV"%s"BLUESV"]",pName(params[ 0 ]),pName(playerid), params[ 1 ]);
	    SendClientMessageToAll(REDS, string);

		SetPVarInt(params[ 0 ],"Club",0);
		SpawnPlayer(params[ 0 ]);
    }
    else if(GetPVarInt(params[ 0 ],"Club") == 3)
    {
		MotoM--;
		SaveTeamLimits();
		new string[ 128 ];
		format(string, sizeof(string), "%s "BLUESV"has been Club kicked by "REDSV"%s "BLUESV"[Reason: "REDSV"%s"BLUESV"]",pName(params[ 0 ]),pName(playerid), params[ 1 ]);
	    SendClientMessageToAll(REDS, string);

		SetPVarInt(params[ 0 ],"Club",0);
		SpawnPlayer(params[ 0 ]);
    }
	return 1;
}
After I use it,I get unknown command,my skin changes but nothing more happens.

Ideas?


Re: Unknown command. - showarn - 15.07.2013

get any errors ?


Re: Unknown command. - SumX - 16.07.2013

no errors


Re: Unknown command. - SumX - 16.07.2013

by the way,I have seen some topics with same problem,but they are using mysql.They get unknown command,same like me.But Im using y_ini.

I forgot to tell you that my saving system has some problems.Sometimes it is not loading my stats.This can cause my problem?