CMD:ginvite( playerid, params[ ] )
{
if ( PlayerInfo[ playerid ][ GRank ] != 5 && PlayerInfo[ playerid ][ GRank ] != 10 )
return SendClientMessage( playerid, 0xFF0000FF, "You need rank 5 to acces this command" );
new Player, OptionalMessage[ 128 ];
if ( sscanf( params, "uS(Come to my group)[128]", Player, OptionalMessage ) )
return SendClientMessage( playerid, 0xFF0000FF, "USAGE: {FFFF00}/ginvite [PlayerID] <Message>" );
if ( !IsPlayerConnected( Player ) )
return SendError( playerid, "Player not connected!" );
if ( PlayerInfo[ Player ][ GID ] != 0 )
return SendError( playerid, "Player is already in a group!" );
if ( PlayerInfo[ Player ][ Ignore_group_Invite ] == 1 )
return SendError( playerid, "Player have /ici activated! Can't get any invitations in groups!" );
gsString[ 0 ] = EOS;
format( gsString, sizeof( gsString ), "~r~Invitation send to ID: ~h~~y~%d", Player );
Announce( playerid, gsString, 4000, 4 );
new pField[ 50 ], xgroupScores;
format( gsQuery, 128, "SELECT * FROM `groups` WHERE `id` = '%d'", PlayerInfo[ playerid ][ GID ] );
mysql_query( gsQuery );
mysql_store_result( );
if ( mysql_retrieve_row( ) )
{
mysql_get_field( "GScore", pField ); xgroupScores = strval( pField );
mysql_get_field( "name", pField );
}
mysql_free_result( );
FormatMSG( Player, COLOR_ORANGE, ""W"The leader {FF0000}%s"W" of {FF0000}%s"W" group send you an invitation in his group.\n"W"group has %d scores.\n\nInviation Message: {FF0000}%s\n\nDo you want to be a member of {FF0000}%s"W" group? /accept to accept and /deny to deny", PlayerName( playerid ), pField, xgroupScores, OptionalMessage, pField );
InvitedGroupID[ Player ] = playerid;
return ( 1 );
}
if ( sscanf( params, "uS(Come to my group)[128]", Player, OptionalMessage ) )
if ( sscanf( params, "uS[128]", Player, OptionalMessage ) )
What the fuck is
PHP код:
PHP код:
|