Jump 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.

hallo ik had een vraag hoe maak ik een admin area ? weet iemand dat MVG raimon

Featured Replies

Ik heb er 1:

De 'IsPlayerinArea' functie heb ik van het sa-mp forum gehaald, de 'public AdminArea'-gedeelte heb ik zelf gemaakt.

Ik neem aan dat je wel wat basis-kennis hebt wat betreft scripten.

Dus je weet wel waar je de volgende codes neer moet zetten.

In dit geval is de AdminArea het Area69 in de woestijn van San Andreas

Bovenaan je script:

forward AdminArea(playerid);

Bij 'public OnGamemodeInit' :

SetTimer("AdminArea", 400, 1);

Ergens onderaan je script:

IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid, x, y, z);
	if (x > minx && x < maxx && y > miny && y < maxy) return 1;
	return 0;
}

Ergens onderaan in je script:

public AdminArea(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (IsPlayerInArea(i,97.5436, 285.1614, 1798.8602, 1940.8845) == 1)
{
if (!IsPlayerAdmin(i)) {
GameTextForPlayer(i, "~r~ You are not allowed to enter the AdminArea!", 7000, 3);
SetPlayerPos(i, 77.7069,1920.8846,17.6406);
SetPlayerFacingAngle(i, 270);
}}}}
return 1;
}

Ik heb hem alleen getest in mn eentje (alleen id 0 dus)

Ik weet niet of hij werkt voor meerdere spelers. (id 1 en hoger)

Ik hoop dat iemand anders dit kan fixen dan.

Grtz Sandra

Edit: Ik heb bij public AdminArea 'playerid' vervangen door 'i'

mogelijk werkt dit wel voor meerdere spelers. (in iedergeval werkt het voor id 0 (zelf getest))

Edit 2: Ik heb vlug even een klein commando gemaakt ( /adminarea ) die je voor de poort van de admin area zet.

(Dan hoef je er niet steeds heen te rijden als je de adminarea wilt testen:

if(strcmp(cmdtext, "/adminarea", true) == 0) {
SetPlayerPos(playerid, 77.7069,1920.8846,17.6406);
SetPlayerFacingAngle(playerid, 270);
return 1;
}

Edited by Sandra18[NL]

k zocht al een tijdje zoon admin area k ga ff testen maar heel erg bedankt thedeadh of terwel Raimon om dit bericht te plaatsen en tnx Sandra om daar op te reageren

MVG Randolph

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.

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.