16.04.2017, 13:06
(
Последний раз редактировалось Slavica; 16.04.2017 в 17:49.
)
What am I doing?
I am working on a police database system that officers can use to see if a player has any active warrans...
When a player (officer) clicks on a search textdraw, he gets a dialog where he can type the name of a player he wants to search.
Also officers can create warrants by clicking on a create warrant textdraw and then they will get a dialog where they have to type in the players name...
How is that suppose to work?
Well when a officer wants to make a warrant he will type in a players name and in scriptfiles/warrants, folder with that player name will be created. ((dini_Create))
When a officer wants to check if a player has a active warrant,the script will check if the folder exists with ((dini_Exists))
But the problem is...
When a player types in a name of a player he wants to add to the "wanted list" dini doesnt create a file with that players name...
What am I doing wrong?
ps
Sorry for my bad english
I am working on a police database system that officers can use to see if a player has any active warrans...
When a player (officer) clicks on a search textdraw, he gets a dialog where he can type the name of a player he wants to search.
Also officers can create warrants by clicking on a create warrant textdraw and then they will get a dialog where they have to type in the players name...
How is that suppose to work?
Well when a officer wants to make a warrant he will type in a players name and in scriptfiles/warrants, folder with that player name will be created. ((dini_Create))
When a officer wants to check if a player has a active warrant,the script will check if the folder exists with ((dini_Exists))
But the problem is...
When a player types in a name of a player he wants to add to the "wanted list" dini doesnt create a file with that players name...
What am I doing wrong?
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_NEWWARANT) { if(response == 1) { new name = strval(inputtext); new namef[100]; format(String,sizeof(String),"%s.ini",name); dini_Create("/Warrants/%s.ini"); SendClientMessage(playerid,COLOR_RED,"Warrant created!"); return 1; } return 1; } if(dialogid == DIALOG_SEARCH) { if(response == 1) { new ime = strval(inputtext); new namef[100]; format(namef,sizeof(namef),"%s.ini",name); if(dini_Exists("/Warrants/%s.ini")) { SendClientMessage(playerid,COLOR_RED,"Warrant found!"); //napravi_textdrawe_za_nadenu_tjeralicu_start //napravi_textdrawe_za_nadenu_tjeralicu_end } else{ SendClientMessage(playerid,COLOR_GREEN,"No active warrant"); } } return 1; } return 0; }
Sorry for my bad english