[Tutorial] [TUT] Creating a Register System using Dini
#37

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
  new cmd[256], idx, file[128], tmp[256], tmp2[256];
	cmd = strtok(cmdtext, idx);
		if(strcmp(cmd, "/register", true) == 0)
	{
	  new name[MAX_PLAYER_NAME];
	  tmp = strtok(cmdtext, idx);
	  GetPlayerName(playerid, name, sizeof(name));
	  if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /register [password]");
	  format(file,sizeof(file),"%s.ini",name);
	  if(!fexist(file))
			{
			  dini_Create(file);
			  dini_IntSet(file, "Password", udb_hash(tmp));
			  dini_IntSet(file,"Materials", 10);
			  dini_IntSet(file,"Cash", 10);
			  dini_IntSet(file,"Dead", 0);
			  SendClientMessage(playerid, COLOR_SYSTEM, "Account created!");
			  PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
			  GetPlayerName(playerid, name, sizeof(name));
			  printf("%s has registered a account!", name);
			}
			else
			{
			  SendClientMessage(playerid, COLOR_SYSTEM, "[System]: Account already found in database!");
        PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
			}
		return 1;
	}
I have added Class, Materials, Dead and Money... so... I need a code so if the player deads the variable 'Dead' sets to True (1), and if the name is Dead you can't play in that account enymore.

If anyone can help me thanks

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    // What goes here?
	return 1;
}
Code:
public OnPlayerConnect(playerid)
{
    // And here?
	return 1;
}
I hope you get me. thanks.
Reply


Messages In This Thread
[TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 12:25
Re: [TUT] Creating a Register System using Dini - by kLx - 11.10.2009, 12:27
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 12:28
Re: [TUT] Creating a Register System using Dini - by [03]Garsino - 11.10.2009, 12:28
Re: [TUT] Creating a Register System using Dini - by dirkblok - 11.10.2009, 12:43
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 12:47
Re: [TUT] Creating a Register System using Dini - by dirkblok - 11.10.2009, 12:52
Re: [TUT] Creating a Register System using Dini - by dirkblok - 11.10.2009, 13:12
Re: [TUT] Creating a Register System using Dini - by cepiokas - 11.10.2009, 13:25
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 13:34
Re: [TUT] Creating a Register System using Dini - by cepiokas - 11.10.2009, 13:37
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 13:39
Re: [TUT] Creating a Register System using Dini - by cepiokas - 11.10.2009, 13:46
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 13:48
Re: [TUT] Creating a Register System using Dini - by cepiokas - 11.10.2009, 13:53
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 14:02
Re: [TUT] Creating a Register System using Dini - by cepiokas - 11.10.2009, 14:17
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 14:24
Re: [TUT] Creating a Register System using Dini - by lolmaster - 11.10.2009, 15:17
Re: [TUT] Creating a Register System using Dini - by cepiokas - 11.10.2009, 16:55
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 11.10.2009, 18:43
Re: [TUT] Creating a Register System using Dini - by cepiokas - 11.10.2009, 19:10
Re: [TUT] Creating a Register System using Dini - by Abernethy - 12.10.2009, 00:30
Re: [TUT] Creating a Register System using Dini - by Niixie - 07.12.2009, 16:54
Re: [TUT] Creating a Register System using Dini - by Dodo9655 - 11.12.2009, 15:16
Re: [TUT] Creating a Register System using Dini - by rong13 - 16.12.2009, 15:06
Re: [TUT] Creating a Register System using Dini - by DeathOnaStick - 16.12.2009, 17:53
Re: [TUT] Creating a Register System using Dini - by rong13 - 16.12.2009, 18:19
Re: [TUT] Creating a Register System using Dini - by DeathOnaStick - 16.12.2009, 18:20
Re: [TUT] Creating a Register System using Dini - by LarzI - 16.12.2009, 18:32
Re: [TUT] Creating a Register System using Dini - by rong13 - 16.12.2009, 18:40
Re: [TUT] Creating a Register System using Dini - by rong13 - 16.12.2009, 18:44
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 16.12.2009, 19:33
Re: [TUT] Creating a Register System using Dini - by rong13 - 16.12.2009, 19:43
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 16.12.2009, 19:47
Re: [TUT] Creating a Register System using Dini - by rong13 - 16.12.2009, 20:26
Re: [TUT] Creating a Register System using Dini - by admantis - 17.12.2009, 16:05
Re: [TUT] Creating a Register System using Dini - by Willstah - 20.12.2009, 20:42
Re: [TUT] Creating a Register System using Dini - by Juve913 - 24.12.2009, 06:47
Re: [TUT] Creating a Register System using Dini - by LarzI - 24.12.2009, 09:27
Re: [TUT] Creating a Register System using Dini - by PotH3Ad - 28.12.2009, 02:47
Re: [TUT] Creating a Register System using Dini - by Eazy_Efolife - 04.01.2010, 19:00
Re: [TUT] Creating a Register System using Dini - by Nakki - 11.01.2010, 15:44
Re: [TUT] Creating a Register System using Dini - by [DK]JaloNik - 14.07.2010, 12:45
Re: [TUT] Creating a Register System using Dini - by sorfa - 15.07.2010, 17:44
Re: [TUT] Creating a Register System using Dini - by [DK]JaloNik - 15.07.2010, 18:17
Re: [TUT] Creating a Register System using Dini - by sorfa - 15.07.2010, 18:32
Re: [TUT] Creating a Register System using Dini - by Anthonyx3' - 24.08.2010, 05:05
Re: [TUT] Creating a Register System using Dini - by R@ger - 24.08.2010, 09:35
Re: [TUT] Creating a Register System using Dini - by r3k1lLz_ - 07.09.2010, 10:38
Re: [TUT] Creating a Register System using Dini - by Guest3598475934857938411 - 02.10.2010, 19:34
Re: [TUT] Creating a Register System using Dini - by karakana7 - 31.10.2010, 17:33
Re: [TUT] Creating a Register System using Dini - by Rabbayazza - 10.08.2011, 20:08
Re: [TUT] Creating a Register System using Dini - by Kush - 10.08.2011, 21:45
Re: [TUT] Creating a Register System using Dini - by Rabbayazza - 10.08.2011, 21:47
Re: [TUT] Creating a Register System using Dini - by rooney12 - 10.08.2011, 21:49
Re: [TUT] Creating a Register System using Dini - by Darnell - 13.08.2011, 06:02
Re: [TUT] Creating a Register System using Dini - by Shockey HD - 13.08.2011, 06:28
Re: [TUT] Creating a Register System using Dini - by Darnell - 13.08.2011, 06:35
Re: [TUT] Creating a Register System using Dini - by Kaperstone - 13.08.2011, 08:09
Re: [TUT] Creating a Register System using Dini - by Darnell - 13.08.2011, 08:17
Re: [TUT] Creating a Register System using Dini - by PhoenixB - 13.08.2011, 11:11
Re: [TUT] Creating a Register System using Dini - by Kaperstone - 14.08.2011, 12:46
Re: [TUT] Creating a Register System using Dini - by NomNom - 19.08.2011, 22:03
Re: [TUT] Creating a Register System using Dini - by Kush - 19.08.2011, 22:15
Re: [TUT] Creating a Register System using Dini - by Henkie - 24.08.2011, 07:11
AW: [TUT] Creating a Register System using Dini - by Santox14 - 27.09.2011, 16:24
AW: [TUT] Creating a Register System using Dini - by Santox14 - 27.09.2011, 16:33
Re: [TUT] Creating a Register System using Dini - by Don21x - 25.12.2012, 17:02
Re: [TUT] Creating a Register System using Dini - by Denying - 25.02.2013, 09:03
Respuesta: [TUT] Creating a Register System using Dini - by RiChArD_A - 25.02.2013, 13:15
Re: [TUT] Creating a Register System using Dini - by Joshly98 - 27.06.2013, 07:28
Re: [TUT] Creating a Register System using Dini - by freeze98 - 20.08.2014, 15:26

Forum Jump:


Users browsing this thread: 1 Guest(s)