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.

tekst probleempje

Ben ik weer met een probleem,

Ik had van een andere filterscript een commado gehaalt dat je met /idea een idea kunt opslaan.

Ik heb dat toen in mijn server gezet,

maar toen heb ik ook zo'n fuctie gemaakt voor bugs,

eerst werkte hij toen niet meer maar nu slaat hij het wel op..... maar wel dubbel, onder ideas en onder bugs hetzelfde.

Ik denk dat het komt omdat hij mischien hetzelfde tekst pakt maar ik weet niet echt hoe ik dit op moet lossen,

Dit is de code:

	if(strcmp(cmd, "/idea", true) == 0)
{
	new length = strlen(cmdtext);
	if(length < 11) return SendClientMessage(playerid,COLOR_RED,"ERROR: What is the idea / suggestion ?");

	new File:SavePosFile, ip[50], year,month,day, hour,minute,second;

	GetPlayerIp(playerid,ip,sizeof(ip) );	GetPlayerName(playerid, name, sizeof(name));
	getdate(year,month,day); gettime(hour,minute,second);

	SavePosFile = fopen("ideas.txt",io_append);
	format(string,sizeof(string),"[%d.%d.%d %d:%d] %s,%d,%s>%s\r\n",day,month,year,hour,minute, name,playerid,ip,cmdtext[6]);
	fwrite(SavePosFile,string);
	fclose(SavePosFile);

	GameTextForPlayer(playerid,"~n~Idea Sent",1000,6);
	PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
	if(strcmp(cmd, "/bug", true) == 0)
{
new length = strlen(cmdtext);
	if(length < 11) return SendClientMessage(playerid,COLOR_RED,"ERROR: What is the bug / problem ?");

	new File:SavePosFile, ip[50], year,month,day, hour,minute,second;

	GetPlayerIp(playerid,ip,sizeof(ip) );	GetPlayerName(playerid, name, sizeof(name));
	getdate(year,month,day); gettime(hour,minute,second);

	SavePosFile = fopen("bug.txt",io_append);
	format(string,sizeof(string),"[%d.%d.%d %d:%d] %s,%d,%s>%s\r\n",day,month,year,hour,minute, name,playerid,ip,cmdtext[6]);
	fwrite(SavePosFile,string);
	fclose(SavePosFile);

	GameTextForPlayer(playerid,"~n~Bug Sent",1000,6);
	PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}

Featured Replies

Voeg return 1; toe aan het eind van een command...

  • Author

Logich..

Nu zie ik het ook,

Ik was het gewoon vergeten,

Ik heb die code tich keer doorgekeken maar het ontging me dat ik return 1; vergeten was,

  • Author

Nee, Het loste het probleem niet op.

nu werk alleen idea nog,

met /bug krijg ik precies hetzelfde als met /idea

Als ik cmd naar cmdtext doe dan krijg ik wel ERROR: What is the idea / suggestion ?

en bij bug ERROR: What is the bug/ problem?");

maar dan word r niks opgeslagen,

De rest van mijn gamemode werkt wel met cmdtext

	if(strcmp(cmd, "/idea", true) == 0)
{
	new length = strlen(cmdtext);
	if(length < 11) return SendClientMessage(playerid,COLOR_RED,"ERROR: What is the idea / suggestion ?");

	new File:SavePosFile1, ip[50], year,month,day, hour,minute,second;

	GetPlayerIp(playerid,ip,sizeof(ip) );	GetPlayerName(playerid, name, sizeof(name));
	getdate(year,month,day); gettime(hour,minute,second);

	SavePosFile1 = fopen("ideas.txt",io_append);
	format(string,sizeof(string),"[%d.%d.%d %d:%d] %s,%d,%s>%s\r\n",day,month,year,hour,minute, name,playerid,ip,cmdtext[6]);
	fwrite(SavePosFile1,string);
	fclose(SavePosFile1);

	GameTextForPlayer(playerid,"~n~Idea Sent",1000,6);
	PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
	return 1;
}
	if(strcmp(cmd, "/bug", true) == 0)
{
	new length = strlen(cmdtext);
	if(length < 11) return SendClientMessage(playerid,COLOR_RED,"ERROR: What is the bug / problem ?");

	new File:SavePosFile2, ip[50], year,month,day, hour,minute,second;

	GetPlayerIp(playerid,ip,sizeof(ip) );	GetPlayerName(playerid, name, sizeof(name));
	getdate(year,month,day); gettime(hour,minute,second);

	SavePosFile2 = fopen("bug.txt",io_append);
	format(string,sizeof(string),"[%d.%d.%d %d:%d] %s,%d,%s>%s\r\n",day,month,year,hour,minute, name,playerid,ip,cmdtext[6]);
	fwrite(SavePosFile2,string);
	fclose(SavePosFile2);

	GameTextForPlayer(playerid,"~n~Bug Sent",1000,6);
	PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
	return 1;
}

Gebruik dcmd. Veel simpeler.

Edit: w00t, post 1000 :D

Edited by David22

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.