11.11.2015, 20:56
(
Последний раз редактировалось 1proplayer1; 11.11.2015 в 22:40.
Причина: Need for help
)
HELLO GUYS
can you help me
Invite player members not work please help me
sorry for my bad English
can you help me
Invite player members not work please help me
sorry for my bad English
PHP код:
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 );
}