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.

Cashbox

Hoi, k heb nogal wat problemen.

K ben bezig met mn eigen server... maar hoe maak ik in godshemelsnaam een cashbox? ik dacht aan zoiets net als (heel schematisch):

setplayercheckpoint (cashbox halen plaats)
onplayerentercheckpoint
killcheckpoint
{
setplayercheckpoint(waar crack plaatsvind)

onplayerentercheckpoint
{
givecash
}
Onplayerdeath
{
SetPlayerCheckpoint(eerste checkpoint weer)
killcheckpoint(tweede checkpoint
}
}

k hep zoiets al een keer uitgeprobeerd maar lukte niet zo heel goed... :(

ook al geprobeerd via een pen1 script te halen, maar dat was nog onduidelijker, omdat dat verwikkeld zat met een deathmatch, en via search ook niks gevonde

PS: niet gekeken op forum.sa-mp.com, doet het hier niet (k weet ook niet hoe da komt).

Featured Replies

kan iemand hem helpen? nja , naar 3 dgn :puh:

kan iemand hem helpen? nja , naar 3 dgn :puh:

Met andere woorden: "Ik heb het ook nodig!" ?? :7

Nou vooruit, ik zal een poging doen:

//Bovenaan je script:

new CashBoxStatus[MAX_PLAYERS];

//Bij OnPlayerConnect:

CashBoxStatus[playerid] = 1;
SetPlayerCheckpoint(playerid, x, y, z, size);   // Vul zelf de coordinaten in

//Hier de OnPlayerEnterCheckpoint-callback:

public OnPlayerEnterCheckpoint(playerid)
{
if(CashBoxStatus[playerid] == 1)
{
	SetPlayerCheckpoint(playerid, x, y, z, size); // Waar Crack plaatsvind
	CashBoxStatus[playerid] = 2;
}
else if CashBoxStatus[playerid] == 2)
{
	DisablePlayerCheckpoint(playerid);
	GivePlayerMoney(playerid, bedrag);
	CashBoxStatus[playerid] = 0;
}
}

//Bij OnPlayerDeath:

SetPlayerCheckpoint(playerid, x, y, z, size);  // Eerste Checkpoint
CashBoxStatus[playerid] = 1;

Ik hoop dat ik je hiermee verder hebt geholpen. :)

Edited by =>Sandra<=

Ik hoop dat ik je hiermee verder hebt geholpen. :)

Je hebt mij iig wel geholpen. Ik wou nu een pickup in het checkpoint zetten. Maar nu weet ik niet hoe ik achter het model kan komen en achter het type.

Ook zou ik graag willen weten dat je ipv als iemand online komt gewoon als de server wordt opgestart en dan om de 20 minuten een nieuwe komt :puh:.

Alvast bedankt,

F-16gek :)

  • Author

heej!

hartstikke bedankt!

k hep nog wel een paar laatste dingen, maar ben al een stuk verder!

D:\Cas\GTASA\samp\gamemodes\reallife.pwn(231) : error 017: undefined symbol "playerid"

D:\Cas\GTASA\samp\gamemodes\reallife.pwn(232) : error 017: undefined symbol "playerid"

D:\Cas\GTASA\samp\gamemodes\reallife.pwn(483) : error 001: expected token: "*then", but found ")"

D:\Cas\GTASA\samp\gamemodes\reallife.pwn(483) : error 029: invalid expression, assumed zero

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

Gebruik dit helemaal bovenaan (bij alle andere new's):

new Float:RondomMission1[3][4] = { 
// Je kan [3] verandere door het aantal plaatsen die je heb, in dit geval 3
{-1248.4559,-102.8510,14.1484,6.0}, //Plaats 1
{1823.1523,-2629.6255,13.5469,6.0}, //Plaats 2
{1676.5482,1632.8853,10.8203,6.0} //Plaats 3 
//Laatste coordinaat MOET altijd ZONDER de ,  (comma) op het laatst
};

en dan vervang je dit:

SetPlayerCheckpoint(playerid, x, y, z, size);

Door dit:

SetPlayerCheckpoint(playerid, RondomMission1[rand1][0], RondomMission1[rand1][1], RondomMission1[rand1][2], RondomMission1[rand1][3]);

Edited by WackoX

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

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.