Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stats opslaan

Hai, daar ben ik weer.

Ik heb dus 'n tut gevolgd, dit is de enige die het doet bij mij maar hij slaat niet op.

Kan iemand me misschien helpen?

Ik weet niet wat ik moet posten dus ik post maar alles wat ik heb.

#include <dini>

#include <dudb>

new IsLogged[MAX_PLAYERS];

enum pInfo
{
Admin,
Geld,
Score
}

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,"Admin", 0);
		  dini_IntSet(file,"Geld", 0);
                         dini_IntSet(file,"Score", 0);
		  SendClientMessage(playerid, kleur, "[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, " Account Already Found In Database");
               PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
		}
	return 1;
}

	if(strcmp(cmd, "/login", true) == 0)
{
  new PlayerName[24];
  tmp = strtok(cmdtext, idx);
  if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /login [password]");
	new name[MAX_PLAYER_NAME];
	if(IsLogged[playerid] == 1)
	{
		SendClientMessage(playerid, COLOR, "You already are logged in!");
		return 1;
	}
	else
	{
		GetPlayerName(playerid, name, sizeof(name));
		format(file,sizeof(file),"%s.ini",name);
		if(fexist(file))
		{
	  	tmp2 = dini_Get(file, "Password");
		 	if(udb_hash(tmp) != strval(tmp2))
			{
			  SendClientMessage(playerid, COLOR, "Login Failed!");
 			  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
 			  printf("%s has failed to login", name);
			}
			else
			{
			 	IsLogged[playerid] = 1;
			 	SetPlayerMoney(playerid, dini_Int(file, "Geld"));
				PlayerInfo[playerid][AdminLevel] = dini_Int(file, "Admin");
                                       SetPlayerScore(playerid, dini_Int(file, "Score"));
				SendClientMessage(playerid, COLOR, "[system]: Account Logged into!");
			}
		}
	}
	return 1;
}

IsLogged[playerid] = 0;

Groetjes mij.

Featured Replies

  • Author

Ik wil graag dit stat system houden, want andere tuts snap ik nooit.

Die van Morph1 had ik idd ook al naar gekeken, 2errors en 6errors gaf die, niks aan tedoen mja.

Ik hoop dat iemand weet hoe ik dit op sla.

Thanks, Surkan

Die van Morph1 had ik idd ook al naar gekeken, 2errors en 6errors gaf die, niks aan tedoen mja.

er is altijd wat aan errors te doen, en inderdaad kloppen die code's niet echt in die release. onderaan staat een filterscript en als Samp 0.3C uitkomt release ik hem opnieuw met een aantal nieuwe functies die ik vanmiddag al helemaal heb gemaakt en uitgetest, en anders als je mijn nieuwe release (die dus pas vanaf 0.3C werkt) nu al wilt hebben kan je me een pm sturen

verder kan ik je niet met dit probleem helpen want ik weet niets van strtok

Edited by Morph1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.