15.07.2013, 20:51
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 ):
After I use it,I get unknown command,my skin changes but nothing more happens.
Ideas?
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;
}
Ideas?

