HELP[REP+]
#1

Why it doesn't work in game?
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == EBoss_Dialog)
    {
        if(
response)
        {
            if(
strlen(inputtext))
            {
                new 
string[500], date[20], yearmonthday;
                
getdate(yearmonthday);
                
format(string,sizeof(string),UFMUsers,nama(playerid));
                
format(datesizeof(date), "%d/%d/%d"daymonthyear);
                
dini_Create(string);
                
dini_IntSet(string"Password"num_hash(inputtext));
                
dini_IntSet(string"Skin"0);
                
dini_IntSet(string"Money"7000);
                
dini_IntSet(string"Kill"0);
                
dini_IntSet(string"Death"0);
                
dini_IntSet(string"Headshot"0);
                
dini_IntSet(string"Moneybag"0);
                
dini_Set(string"RegisteredTime"date);
                
dini_IntSet(string"hours"0);
                
dini_IntSet(string"mins"0);
                
dini_IntSet(string"secs"0);
                
dini_IntSet(string"ConnectTime"0);
                
dini_IntSet(string"Deposit"0);
                
dini_IntSet(string"Withdraw"0);
                
dini_IntSet(string"DJ"0);
                
dini_IntSet(string"VIP"0);
                
dini_IntSet(string"ADM"0);
                
dini_IntSet(string"Logged"1);
                
dini_IntSet(string"Regged"1);
                
dini_Set(string"Tags""");
                
SetData(playerid);
                
format(haha,sizeof(haha),"{00FF00}[ SUCCESS ]: {FFF000}%s[%d] Successfully Register,Say hi to him! [ Rewards:$70000 ]",nama(playerid),playerid)
                
SendClientMessage(-1,haha);
//                dini_IntSet(string, "", 0);
            
} else if(!strlen(inputtext)) { return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must fill in the password on the textbox!"); }
        } else if(!
response){ return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must register to play at this server!"); }
    }
    if(
dialogid == EBoss_Dialog+1)
    {
        if(
response)
        {
           if(
strlen(inputtext))
           {
             new 
string[500];
             
format(string,sizeof(string),UFMUsers,nama(playerid));
             if(
num_hash(inputtext) != dini_Int(string,"Password"))
             {
               
SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You're password is incorrect!");
               
ShowLogin(playerid);
             } else if(
num_hash(inputtext) == dini_Int(string,"Password"))
                
SetData(playerid);
             } else if(!
strlen(inputtext)) { SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must fill in the password on the textbox!"); return ShowLogin(playerid); }
        } else if(!
response){ SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must login to play at this server!"); return ShowLogin(playerid); }
    }
    return 
1;

Reply
#2

Hello!

Can you explain what exactly don't work?
Reply
#3

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Can you explain what exactly don't work?
There is no respond when i press register button it like OnDialogResponse it not have any function
Reply
#4

PHP код:
if(dialogid == EBoss_Dialog)
{
    if(
response)
     {
          if(
strlen(inputtext))
        {
            print(
"strlen(inputtext");
             new 
string[500], date[20], yearmonthday;
            
getdate(yearmonthday);
            
format(string,sizeof(string),UFMUsers,nama(playerid));
            
format(datesizeof(date), "%d/%d/%d"daymonthyear);
            
dini_Create(string);
            
dini_IntSet(string"Password"num_hash(inputtext));
            
dini_IntSet(string"Skin"0);
            
dini_IntSet(string"Money"7000);
            
dini_IntSet(string"Kill"0);
            
dini_IntSet(string"Death"0);
            
dini_IntSet(string"Headshot"0);
            
dini_IntSet(string"Moneybag"0);
            
dini_Set(string"RegisteredTime"date);
            
dini_IntSet(string"hours"0);
            
dini_IntSet(string"mins"0);
            
dini_IntSet(string"secs"0);
            
dini_IntSet(string"ConnectTime"0);
            
dini_IntSet(string"Deposit"0);
            
dini_IntSet(string"Withdraw"0);
            
dini_IntSet(string"DJ"0);
            
dini_IntSet(string"VIP"0);
            
dini_IntSet(string"ADM"0);
            
dini_IntSet(string"Logged"1);
            
dini_IntSet(string"Regged"1);
            
dini_Set(string"Tags""");
            
SetData(playerid);
            print(
"SetData");
            
format(haha,sizeof(haha),"{00FF00}[ SUCCESS ]: {FFF000}%s[%d] Successfully Register,Say hi to him! [ Rewards:$70000 ]",nama(playerid),playerid)
            
SendClientMessage(-1,haha);
    
//      dini_IntSet(string, "", 0);
        
} else if(!strlen(inputtext)) { return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must fill in the password on the textbox!"); }
    } else if(!
response){ return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must register to play at this server!"); }

What is printing in the console (server.log.txt) when you take this code?
Reply
#5

Quote:
Originally Posted by Mencent
Посмотреть сообщение
PHP код:
if(dialogid == EBoss_Dialog)
{
    if(
response)
     {
          if(
strlen(inputtext))
        {
            print(
"strlen(inputtext");
             new 
string[500], date[20], yearmonthday;
            
getdate(yearmonthday);
            
format(string,sizeof(string),UFMUsers,nama(playerid));
            
format(datesizeof(date), "%d/%d/%d"daymonthyear);
            
dini_Create(string);
            
dini_IntSet(string"Password"num_hash(inputtext));
            
dini_IntSet(string"Skin"0);
            
dini_IntSet(string"Money"7000);
            
dini_IntSet(string"Kill"0);
            
dini_IntSet(string"Death"0);
            
dini_IntSet(string"Headshot"0);
            
dini_IntSet(string"Moneybag"0);
            
dini_Set(string"RegisteredTime"date);
            
dini_IntSet(string"hours"0);
            
dini_IntSet(string"mins"0);
            
dini_IntSet(string"secs"0);
            
dini_IntSet(string"ConnectTime"0);
            
dini_IntSet(string"Deposit"0);
            
dini_IntSet(string"Withdraw"0);
            
dini_IntSet(string"DJ"0);
            
dini_IntSet(string"VIP"0);
            
dini_IntSet(string"ADM"0);
            
dini_IntSet(string"Logged"1);
            
dini_IntSet(string"Regged"1);
            
dini_Set(string"Tags""");
            
SetData(playerid);
            print(
"SetData");
            
format(haha,sizeof(haha),"{00FF00}[ SUCCESS ]: {FFF000}%s[%d] Successfully Register,Say hi to him! [ Rewards:$70000 ]",nama(playerid),playerid)
            
SendClientMessage(-1,haha);
    
//      dini_IntSet(string, "", 0);
        
} else if(!strlen(inputtext)) { return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must fill in the password on the textbox!"); }
    } else if(!
response){ return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must register to play at this server!"); }

What is printing in the console (server.log.txt) when you take this code?
Only This
Quote:

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[16:49:24]
[16:49:24] Server Plugins
[16:49:24] --------------
[16:49:24] Loading plugin: streamer
[16:49:24]

*** Streamer Plugin v2.7.8 by Incognito loaded ***

[16:49:24] Loaded.
[16:49:24] Loading plugin: sscanf
[16:49:24]

[16:49:24] ===============================

[16:49:24] sscanf plugin loaded.

[16:49:24] Version: 2.8.1

[16:49:24] © 2012 Alex "******" Cole

[16:49:24] ===============================

[16:49:24] Loaded.
[16:49:24] Loading plugin: iTD
[16:49:25]
* iTD Plugin loaded. (Support for textdraw editor mouse/keyboard)

[16:49:25] Loaded.
[16:49:25] Loaded 3 plugins.

[16:49:25]
[16:49:25] Ban list
[16:49:25] --------
[16:49:25] Loaded: samp.ban
[16:49:25]
[16:49:25]
[16:49:25] Filterscripts
[16:49:25] ---------------
[16:49:25] Loading filterscript 'iTD.amx'...
[16:49:25]
iPLEOMAX's TextDraw Editor loaded successfully!
Version: 1.16 Stable (13/10/2012)

[16:49:25] Loading filterscript 'Bodypanel.amx'...
[16:49:25] Loading filterscript 'GarObject.amx'...
[16:49:25]
[16:49:25]
[16:49:25]
[16:49:25] =======================================
[16:49:25] | |
[16:49:25] | YSI version 3.09.0684 |
[16:49:25] | By Alex "******" Cole |
[16:49:25] | |
[16:49:25] =======================================
[16:49:25]
[16:49:25]
[16:49:25]
[16:49:25]
>> DH240473 Object Creator Loaded <<

[16:49:25] Loading filterscript 'map.amx'...
[16:49:25] Loaded 4 filterscripts.

[16:49:25]
Copyright By Hxrith
[16:49:25] Number of vehicle models: 0
[16:49:57] [connection] 127.0.0.1:51197 requests connection cookie.
[16:49:58] [connection] incoming connection: 127.0.0.1:51197 id: 0
[16:49:58] [join] [H]arith has joined the server (0:127.0.0.1)
[16:50:01] strlen(inputtext

Reply
#6

PHP код:
if(dialogid == EBoss_Dialog)
{
    if(
response)
     {
          if(
strlen(inputtext))
        {
            print(
"strlen(inputtext");
             new 
string[500], date[20], yearmonthday;
            
getdate(yearmonthday);
            
format(string,sizeof(string),UFMUsers,nama(playerid));
            print(
"after format");
            
format(datesizeof(date), "%d/%d/%d"daymonthyear);
            
dini_Create(string);
            
dini_IntSet(string"Password"num_hash(inputtext));
            
dini_IntSet(string"Skin"0);
            
dini_IntSet(string"Money"7000);
            
dini_IntSet(string"Kill"0);
            
dini_IntSet(string"Death"0);
            
dini_IntSet(string"Headshot"0);
            
dini_IntSet(string"Moneybag"0);
            
dini_Set(string"RegisteredTime"date);
            
dini_IntSet(string"hours"0);
            
dini_IntSet(string"mins"0);
            
dini_IntSet(string"secs"0);
            
dini_IntSet(string"ConnectTime"0);
            
dini_IntSet(string"Deposit"0);
            
dini_IntSet(string"Withdraw"0);
            
dini_IntSet(string"DJ"0);
            
dini_IntSet(string"VIP"0);
            
dini_IntSet(string"ADM"0);
            
dini_IntSet(string"Logged"1);
            
dini_IntSet(string"Regged"1);
            
dini_Set(string"Tags""");
            
SetData(playerid);
            print(
"SetData");
            
format(haha,sizeof(haha),"{00FF00}[ SUCCESS ]: {FFF000}%s[%d] Successfully Register,Say hi to him! [ Rewards:$70000 ]",nama(playerid),playerid)
            
SendClientMessage(-1,haha);
    
//      dini_IntSet(string, "", 0);
        
} else if(!strlen(inputtext)) { return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must fill in the password on the textbox!"); }
    } else if(!
response){ return SendClientMessage(playerid,-1,"{FF0000}[ ERROR ]: {FFF000}You must register to play at this server!"); }

And so?

If only "strlen(inputtext" is printing then you can show me your UFMUsers function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)