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.

Als iemand rcon admin inlogt hem iets geven?

Hoi,

ik wil in mijn script dat als iemand met Rcon Admin inlogt dat zijn kleur dan veranderd, maar hoe doe ik dat? er staat niets op wiki.sa-mp.com. Dus daar kan ik ook niet zoeken :(

Bedankt voor jullie hulp Cie Ya

Featured Replies

new IsPlayerRconAdmin[MAX_PLAYERS];

public OnGameModeInit()
{
SetTimer("CheckForNewAdmins", 5000, 1);
return 1;
}

public OnPlayerConnect(playerid)
{
IsPlayerRconAdmin[playerid] = 0;
return 1;
}

forward CheckForNewAdmins();
public CheckForNewAdmins()
{
for(new i; i<MAX_PLAYERS; i++)
{
	if(IsPlayerConnected(i))
	{
		if(IsPlayerAdmin(i) && IsPlayerRconAdmin[i] == 0)
		{
			IsPlayerRconAdmin[i] = 1;
			// Doe hier de dingen die je wilt doen met de pas ingelogde admin
			// SetPlayerColor(i, .........
		}
	}
}
}

Als je je al als rcon admin de server inkomt (door voordat je connect het rcon password in te vullen)

heb je hieraan al genoeg:

public OnPlayerConnect(playerid)
{
if(IsPlayerAdmin(playerid))
{
	SetPlayerColor(playerid, ........ );
}
return 1;
}

  • Author

THX, ik ga niet voor devolgende vraag glijk een niet topic aanmaken dus stel ik die hier:

Hoe maak ik profielen aan in een map die in scriptfiles staat? Dus iemand maakt een account en zijn file word niet in de map 'scriptfiles' gezet maar in de map 'scriptfiles/users', ik denk dat ik duidelijk bent en dit wil ik weten om niet in de war te raken met andere files :Y Weer alvast bedankt

Cie Ya

Voorbeeld:

new FileName[64];
new PName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PName, sizeof(PName));
format(FileName, 64, "PlayerFiles/%s.txt", PName);
dini_Create(FileName);
dini_IntSet(FileName, "AdminLevel", 1337);

Nu staat er in de map 'PlayerFiles' (die weer in de map 'scriptfiles' staat) het bestand (bijvoorbeeld) 'nick5556.txt'

Let Op: Sa:mp kan niet zelf mappen aanmaken, je moet ze wel zelf eerst aanmaken!

Als je bijvoorbeeld in de map:

scriptfiles --> StuntServer --> Races --> Highscores

het bestand 'race4highscore.log' wilt aanmaken doe je dat zo:

dini_Create("StuntServer/Races/Highscores/race4highscore.txt");

Edited by =>Sandra<=

  • Author

En alweer THX :tu:

EDIT:

Dat met new i; enzo ( die loop ) vind ik onzin dus ik heb het zo gedaan:

public IsPlayerRconAdminCheck(playerid)
{
if(IsPlayerConnected(playerid))
{
	if(IsPlayerAdmin(playerid) && IsPlayerRconAdmin[playerid] == 0)
	{
		SetPlayerColor(playerid, COLOR_ADMINS);
	}
}
return 1;
}

Maar dit werkt niet, ik krijg geen errors enzo dus dat is het ook niet :(

dit staat bovenaan:

new RconAdminTimer = 60000;
new IsPlayerRconAdmin[MAX_PLAYERS];
forward IsPlayerRconAdminCheck(playerid);

en dit in onplayerconnect:

public OnPlayerConnect(playerid)
{
IsPlayerRconAdmin[playerid] = 0; // rcon admin op 0 zetten
IsPlayerModerator[playerid] = 0; // moderator op 0 zetten
PlayerLoggedIn[playerid] = 0; // login op 0 zetten
SetPlayerColor(playerid, COLOR_NOT_SPAWNED); // niet gespawnde kleur geven
return 1;
}

Maar mijn kleur blijft op COLOR_NOT_SPAWNED staan.. Wat moet ik doen om dit te verbeteren??

EDIT: Al gelukt..

Edited by nick5556

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.