Jump to content

Question

Posted

SAL ALL

Am o  prblema cand creez clanul imi insereaza tot cemi trb clan sef clan members clan leaderskin tot Dar dupa ce intru iar pe sv zice ca nush in nicun clan ce sa fac putin ajutor e pe Sql

public OnPlayerSpawn( playerid )

{

        new Query5[ 256 ], strings3[ 128 ];

      format( Query5, sizeof( Query5), "SELECT `id`, `ClanLeaderSkin`, `ClanSef`, `ClanMembers` FROM `Clans` WHERE `Name` = '%s'",C_DATA[playerid][ClanSef], C_DATA[playerid][ClanMembers], C_DATA[playerid][ClanLeaderSkin], Name( playerid ) );

        Result = db_query( Database, Query5 );

        if ( db_num_rows( Result ) )

        {

            new Field[ 30 ];

        db_get_field_assoc( Result, "ClanLeaderSkin", Field, 30 );

        C_DATA[ playerid ][ ClanLeaderSkin ] = strval( Field );

        db_get_field_assoc( Result, "ClanSef", Field, 30 );

        C_DATA[ playerid ][ ClanSef ] = strval( Field );

        db_get_field_assoc( Result, "ClanMembers", Field, 30 );

        C_DATA[ playerid ][ ClanMembers ] = strval( Field );

        db_get_field_assoc( Result, "id", Field, 30 );

        C_DATA[ playerid ][ ID ] = strval( Field );

        format( strings3, sizeof( strings3 ), "You have clan %s", C_DATA[playerid][ClanName], Name(playerid) );

        SendClientMessage( playerid, 0xFF0000FF, strings3 );

        }

        else

        {

        SendClientMessage( playerid, 0xFF0000FF, "You no have in a clan" );

        }

        db_free_result( Result );

        return 1;

}

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.