25.08.2013, 02:24
Una pregunta mas...
Como puedo hacer, para que en ondialogresponse, se le asigne al especificado ID y no a player ID, la verdad me confundi :c!
pawn Код:
CMD:claninvite(playerid, params[])
{
new id;
if(pInfo[playerid][clanexists] == 0) return SendClientMessage(playerid, red, "This clan doesn't exist.");
if(pInfo[playerid][clanleader] != 1) return SendClientMessage(playerid, red, "You need to be a clan leader.");
if(sscanf( params, "u", id)) return SendClientMessage(playerid, -1, "Usage: /claninvite [ id / playername ]");
format(ssstring, SOS, "%s has requested you to join his clan: %s", pInfo[playerid][pName], pInfo[playerid][clanname]);
ShowPlayerDialog(playerid, DIALOG_JOINEDCLAN, DIALOG_STYLE_TEXT, "Clan invitation", ssstring, "Accept", "Decline");
new query[250];
Query("UPDATE `playerinfo` SET `inclan` = 1 WHERE `id`='%i'",pInfo[playerid][dbid]);
mysql_query( query );
format(ssstring, SOS, "%s has joined the clan!", pInfo[id][pName], pInfo[playerid][clanname]);
SendClientMessageToClan(ORANGE, ssstring);
pInfo[id][clanmember] = 1;
return 1;
}