10.04.2015, 09:21
Hi. I wanted to make the System Contacts (Phone Number) with dialog. But i got problem with this. Compiler is ok but it not working.
Anyone can tell me what problem with my script ?
Thanks for help.
Anyone can tell me what problem with my script ?
Thanks for help.
PHP код:
enum dbInfo
{
dbID,
dbName1[30],
dbName2[30],
dbName3[30],
dbName4[30],
dbName5[30],
dbName6[30],
dbName7[30],
dbName8[30],
dbName9[30],
dbName10[30],
dbName11[30],
dbName12[30],
dbName13[30],
dbName14[30],
dbName15[30],
dbName16[30],
dbName17[30],
dbName18[30],
dbName19[30],
dbName20[30],
dbSDT[20],
};
new DBInfo[MAX_PLAYERS][MAX_DANHBA][dbInfo];
CMD:test(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < MAX_DANHBA; i++)
{
new string[512];
format(string, sizeof(string),"Username\tPhone Number\n%s\t%d",DBInfo[playerid][i][dbName1],DBInfo[playerid][1][dbSDT][1]);
ShowPlayerDialog(playerid,DIALOG_NOTHING,DIALOG_STYLE_TABLIST_HEADERS,"Contacts",string,"Call","Cancel");
}
}
}
CMD:savenumber (playerid, params[])
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid))
{
SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /savenumber [user]");
return 1;
}
for(new i = 0; i < MAX_DANHBA; i++)
{
format(DBInfo[playerid][i][dbName1], 32, "%s", GetPlayerNameEx(giveplayerid));
DBInfo[playerid][1][dbSDT][1] = PlayerInfo[giveplayerid][pPnumber];
SaveContact(playerid, 1);
return 1;
}
return 1;
}