26.05.2011, 15:07
Hello,
Im almost done with a script but im encoutering some problems with the Adress Book System...
1)When i try to add/delete a contact,for example delete one:
It should change the Contact #1 slot in "Nothing" but look what happens:
![](http://imageshack.us/m/8/4843/proof1ra.png)
![](http://imageshack.us/m/849/8083/proof2m.png)
Here is the code:
Please help,i've got to release this today
...
Im almost done with a script but im encoutering some problems with the Adress Book System...
1)When i try to add/delete a contact,for example delete one:
It should change the Contact #1 slot in "Nothing" but look what happens:
![](http://imageshack.us/m/8/4843/proof1ra.png)
![](http://imageshack.us/m/849/8083/proof2m.png)
Here is the code:
pawn Код:
else if (listitem == 1)
{
format(string,sizeof(string),"%s[%d] \n %s[%d] \n %s[%d] \n %s[%d] \n %s[%d]",PlayerInfo[playerid][pCName1],c1,PlayerInfo[playerid][pCName2],c2,PlayerInfo[playerid][pCName3],c3,PlayerInfo[playerid][pCName4],c4,PlayerInfo[playerid][pCName5],c5);
ShowPlayerDialog(playerid, 400,DIALOG_STYLE_LIST,"{808000}Adress Book:",string,"Delete","Leave");
}
if(dialogid == 400)
{
if(response)
{
if (listitem == 0)
{
strmid(PlayerInfo[playerid][pCName1], "Nothing", 0, 7, 7);
PlayerInfo[playerid][pContact1] = 0;
SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #1 deleted.");
}
else if (listitem == 1)
{
strmid(PlayerInfo[playerid][pCName2], "Nothing", 0, 7, 7);
PlayerInfo[playerid][pContact2] = 0;
SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #2 deleted.");
}
else if (listitem == 2)
{
strmid(PlayerInfo[playerid][pCName3], "Nothing", 0, 7, 7);
PlayerInfo[playerid][pContact3] = 0;
SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #3 deleted.");
}
else if (listitem == 3)
{
strmid(PlayerInfo[playerid][pCName4], "Nothing", 0, 7, 7);
PlayerInfo[playerid][pContact4] = 0;
SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #4 deleted.");
}
else if (listitem == 4)
{
strmid(PlayerInfo[playerid][pCName5], "Nothing", 0, 7, 7);
PlayerInfo[playerid][pContact5] = 0;
SendClientMessage(playerid,COLOR_WHITE,"[{095F17}Adress-Book{FFFFFF}]:Contact #5 deleted.");
}
}
}
![undecided](images/smilies/neutral.gif)