i try to make a cuff cmd
i use
[pawn]
else if ( strcmp( cmd, "cuff", true ) == 0 )
{
new reason[ 256 ], szMsg[ 128 ], plr;
tmp = strtok( cmdtext, idx ), reason = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c cuff [Nick/ID]
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
else
{
format( szMsg, sizeof( szMsg ), "Admin %s Freezed player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
SendClientMessageToAll( COLOR_GREEN, szMsg );
TogglePlayerControllable( plr, 0 );
}
return 1;
}[/pawn]
but it not stop a player
there is a line missed
give me the line ple
line of player dissconnect when i go near to him