Help with Phone Numbers
#15

Calisthenics already gave you an answer - however, tell us the name of your "users" table and the column name that you use for phone numbers.

EDIT: Untested code - here's an example of how it could be done:

PHP код:
mysql_format(g_SQLquerysizeof query"UPDATE IGNORE "#TABLE_USERS" SET `PhoneNumber` = %i WHERE `UserID` = %i", phone_number, user_id);
mysql_pquery(g_SQLquery"OnPhoneNumberUpdate""ii"playeridphone_number);
forward OnPhoneNumberUpdate(playeridphone_number);
public 
OnPhoneNumberUpdate(playeridphone_number) {
    if (
cache_affected_rows() != -1) { // Since -1 refers to an error
        // Tell player there phone number was updated
        
pInfo[playerid][PhoneNumber] = phone_number;
        return 
1;
    }
    
    
// Tell player the phone number is already in use
    
return 1;

Reply


Messages In This Thread
Help with Phone Numbers - by ImTobi - 31.07.2018, 06:13
Re: Help with Phone Numbers - by Calisthenics - 31.07.2018, 08:18
Re: Help with Phone Numbers - by ImTobi - 31.07.2018, 08:37
Re: Help with Phone Numbers - by Calisthenics - 31.07.2018, 09:10
Re: Help with Phone Numbers - by ImTobi - 01.08.2018, 04:15
Re: Help with Phone Numbers - by GTLS - 01.08.2018, 05:03
Re: Help with Phone Numbers - by Calisthenics - 01.08.2018, 07:55
Re: Help with Phone Numbers - by ImTobi - 03.08.2018, 00:00
Re: Help with Phone Numbers - by ImTobi - 03.08.2018, 00:05
Re: Help with Phone Numbers - by ImTobi - 05.08.2018, 17:34
Re: Help with Phone Numbers - by ImTobi - 09.08.2018, 09:27
Re: Help with Phone Numbers - by ImTobi - 18.08.2018, 13:26
Re: Help with Phone Numbers - by m4karow - 18.08.2018, 13:31
Re: Help with Phone Numbers - by XStormiest - 18.08.2018, 13:47
Re: Help with Phone Numbers - by Logic_ - 18.08.2018, 17:50
Re: Help with Phone Numbers - by Calisthenics - 18.08.2018, 18:35

Forum Jump:


Users browsing this thread: 4 Guest(s)