Help with Phone Numbers
#14

In your command, although you may need to adapt the following code to suit your gamemode's variables and database.
Код:
mysql_format(your_myql_handle, query, sizeof(query), "SELECT * FROM `your_table_name_here` WHERE `phoneNumbervariablename` = '%d'  LIMIT 1",  number);
mysql_pquery(your_mysql_handle, query, "OnCheckPhoneNumber", "i", playerid);
Then somewhere in your code, the "OnCheckPhoneNumber" or whatever name you'll change it to
Код:
forward OnCheckPhoneNumber(playerid);
public OnCheckPhoneNumber(playerid)
{
      new rows;
      cache_get_row_count(rows); // get the amount of rows from the query
      if(rows > 0) //if the amount of rows is greater than 0, so there is someone that has this same phone number, then 
      {
           // generate a new number phone
      }
      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: 3 Guest(s)