16.04.2012, 13:31
Well.. I have this command:
And this function:
And the command doesn't write in the Database, any ideas why ?
pawn Код:
CMD:freeze( playerid, params[ ] )
{
new u_P;
if( unformat( params, "u", u_P ) ) return Send_Usage( playerid, "[PlayerID]", "Will freeze a specified player, he will cannot freeze-evade!" );
if( u_P == ( 0xFFFF ) ) return eInfo( playerid, "Player not connected" );
if( u_P == playerid ) return eInfo( playerid, "You cannot freeze yourself" );
if( Bit1_Get( g_iBit1_p_DATA[ p_Frozen ], u_P ) ) return eInfo( playerid, "Player is already frozen" );
FreezePlayer( u_P );
return ( 1 );
}
pawn Код:
FreezePlayer( playerid )
{
new Query[ 256 ];
format( Query, sizeof Query, "INSERT INTO `Frozen` VALUES('%s', '%s')", GetPlayerIpEx( playerid ), pName( playerid ) );
DB::query( g_dbKeptAlive, Query );
Bit1_Set( g_iBit1_p_DATA[ p_Frozen ], playerid, 1 );
TogglePlayerControllable( playerid, false );
return ( 1 );
}