Jump to content
  • 0

Question

Posted

Salut am o problema cu comanda /Invite

Deci Ii dau lu unu invitatie ex /Invite 1 ii apare dialogul cand da accept

Nu il insereaza in PlayersClans Hm uitati ce am la comanda.....

Comm

CMD:invite( playerid, params[ ] )

{

if ( C_DATA[ playerid ][ Rank ] == 5 )

{

new cid;

if ( isnull( params ) ) return SendClientMessage( playerid, 0xFF0000, "USAGE: /invite [PlayerID]");

    cid = strval( params );

    if ( !IsPlayerConnected( cid ) ) return SendClientMessage( playerid, 0xFF0000, "ERROR: Player Is Not Connected!");

        if ( C_DATA[ cid ][ createclan ] == C_DATA[ playerid ][ createclan ] ) return SendClientMessage(playerid, 0xFF0000, "EROARE: Jucatorul este deja intr-un clan!");

new string[512], pname[24];

        GetPlayerName( playerid, pname, 24);

format( string, sizeof( string ), "Clan.....", pname, C_DATA[ playerid ][ ClanName ] );

ShowPlayerDialog( cid, DIALOGID_INVITE, DIALOG_STYLE_MSGBOX, "Invitatie", string, "Accept", "Decline" );

GetPlayerName(cid, pname, 24);

    format(string, sizeof(string), "INVITATION SEND TO ID: %d", cid );

        SendClientMessage(playerid, 0xFFCC66, string);

}

else

{

return SendRank( playerid, 5 ); }

return 1;

}

//Invite =====================================================================//

    if ( dialogid == DIALOGID_INVITE )

    {

        if(response == 1)

        {

new Query[ 512 ], DBResult:R;

            new id = db_num_rows( R )+1;

            db_free_result( R );

    format( Query, sizeof( Query ), "INSERT INTO `PlayersClans` ( `Keys`, `Name`, `Clans`, `Rank`, `Clan` ) VALUES( '%d', '%s', '%s', '5', '1' )", id, Name( playerid ), inputtext[ 0 ] );

    R = db_query( Database1, Query );

        }

    }

MS:D

1 answer to this question

Recommended Posts

Posted

Ai mai postat odata http://www.sa-mp.ro/forum/index.php/topic,20496.msg115324.html#msg115324

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

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.