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.

/tieup command werkt niet

// Robin's gang...
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

#define TEAM_GANGSTERS 14

new gTeam[MAX_PLAYERS];

#define COLOR_RED 0xFF0000AA

// uitgehaald

public OnFilterScriptExit()
{
return 1;
}

public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == 14)
   {
GivePlayerWeapon(playerid, 22, 999);
}
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[128];
   new giveplayerid;
   new idx;
   new cmd[32];
   new tmp[32],tmp2[32];
   cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "/tieup", true) == 0)
   {
       tmp = strtok(cmdtext, idx);
       if(strlen(tmp) == 0)
       {
           SendClientMessage(playerid, COLOR_RED, "USAGE: /tieup <ID>");
           return 1;
       }
       if(gTeam[playerid] == 14)
   {
           TogglePlayerControllable(giveplayerid, false);
           return 1;
       }
       else
       {
           SendClientMessage(playerid, COLOR_RED, "You are not an gang member.");
           return 1;
       }
   }

if (strcmp("/makegang", cmdtext, true, 10) == 0)
{
           SetPlayerTeam(giveplayerid, 14);
           return 1;
}

return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(gTeam[playerid] == 14)
   {
SendClientMessage(playerid, COLOR_RED, "Don't let the cops get you! Never give up!");
}
return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
	index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
	result[index - offset] = string[index];
	index++;
}
result[index - offset] = EOS;
return result;
}
#endif

Dat is mijn code. Maar, hij zegt steeds dat ik geen gangster ben. Maar mijn team is gewoon 14. Kan iemand de fout aanduiden?

Edited by robincom

Featured Replies

Nergens in die code wordt "gTeam[playerid]" op 14 gezet.

gTeam[playerid] = 14;

Ik vermoed dat dit er bij het commando "/makegang" bij hoort te staan.

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.