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.

Problem

Kweetniet of er mensen zijn na Jesse en Jarno die hier echt kunnen pawnen een beetje, maar op goede hoop post ik men probleem maar toch :puh: . Note: pawno lijkt veel op C, dus mocht je toch enig idee hebben, kan je het altijd posten.

public OnPlayerConnect(playerid) {
new File:stats = fopen("stats.txt", io_read);
new pname[256];
new str[256];
GetPlayerName(playerid, pname, 256);
while (fread(stats, str)) {
	if(strcmp(str, pname, true)==0) {
		GetVal(str); gPlayerDeaths[playerid] = Val;
		GetSecondVal(str); gPlayerKills[playerid] = Val;
		SendClientMessage(playerid, 0xAA3333AA, "Your stats has been restored.");
	}
}
	fclose(stats);
return 1;
}

Wat doet het script? Het gaat de spelers naam na via GetPlayerName, gaat dan met een while loop het "stats.txt" bestandje lezen, en kijkt of hij een string kan comparen (=vergelijken) met de naam ("pname") . Als dat klopt gaat hij Values na etc.

Wat werkt er niet? Als ik join met de naam [XII]Flame^ en in het stats.txt bestandje staat '[XII]Flame^ 1 1' dan zet het mijn kills + deaths niet naar 1, het blijft 0.

Featured Replies

Guest
This topic is now closed to further replies.

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.