- 0
Invite prb
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
ExTREME.
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
[pawn]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;
}[/pawn]
[pawn]//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 );
}
}[/pawn]
MS:D
9 answers to this question
Recommended Posts