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.

Health

Ik heb al hele tijd zitten prutsen, ik krijg het niet voor mekaar, hoe krijg ik deze /heal werkend?

	if (strcmp(cmd, "/heal", true) == 0)
if (login[playerid] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /heal (playerid)!");
return 1;
}
if (IsStringAName(tmp))
{
playa = GetPlayerID(tmp);
}
else
{
playa = strval(tmp);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
if (adminlevel[playerid] == 3)
{
SendClientMessage(playa, COLOR_RED, "You are not an admin!");
return 1;
}
if (IsPlayerConnected(playa))
{
SendClientMessage(playa, COLOR_RED, "This player isn't online!");
return 1;
}
SetPlayerHealth(playa, 100);
format(string, sizeof(string), "%s was healed by admin %s!", giveplayer, sendername);
SendClientMessageToAll(COLOR_BLUE, string);
return 1;
}

Edited by Scofield6

Featured Replies

Wat werkt er dan niet in het commando?

  • Author

Ik reconnect met de naam: Thomas.

Als ik mezelf niet-admin maak en ik doe in-game:

/heal krijg ik: /heal (playerid)!

/heal (mijn-id) krijg ik: This player isn't online!

/heal (ander-id) krijg ik: Thomas was healed by admin Thomas!

Als ik mezelf admin maak en ik doe in-game:

/heal krijg ik: /heal (playerid)!

/heal (mijn-id) krijg ik: This player isn't online!

/heal (ander-id) krijg ik: Thomas was healed by admin Thomas!

Oftewel er klopt het ene en ander niet.

Iemand die de oplossing weet?

if (strcmp(cmd, "/heal", true) == 0)
if (login[playerid] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /heal (playerid)!");
return 1;
}
if (IsStringAName(tmp))
{
playa = GetPlayerID(tmp);
}
else
{
playa = strval(tmp);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
if (adminlevel[playerid] != 3) // Hier stond if (adminlevel[playerid] == 3) - de code erna voer je dus uit als de speler wel admin lvl 3 is.
{
SendClientMessage(playa, COLOR_RED, "You are not an admin!");
return 1;
}
if (!IsPlayerConnected(playa)) // Hier stond if (IsPlayerConnected(playa)) - de code erna voer je dus uit als de speler wel online is.
{
SendClientMessage(playa, COLOR_RED, "This player isn't online!");
return 1;
}
SetPlayerHealth(playa, 100);
format(string, sizeof(string), "%s was healed by admin %s!", giveplayer, sendername);
SendClientMessageToAll(COLOR_BLUE, string);
return 1;
}

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.