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.

0.3 menu

Ik wilde een 0.3 menu maken, maar nu zit ik vast.

zie de opmerkingen in en na de code

 
if (strcmp("/menu", cmdtext, true, 10) == 0)
{
 ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "menu", "Enter\nBuy Points\n Information", "Select", "Exit"); //eerst doe ik hier select op het 2e item waardoor de inputbox verschijnt.
 return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Quantity = strval(inputtext);
new CurrMoney = GetPlayerMoney(playerid);
gCheckout[playerid]= Quantity*Cost;

if(dialogid == DIALOGID)
{
if(response)
{
if(listitem == 0) 
{
SendClientMessage(playerid,COLOR_BLUE,"some message here");
} 
if(listitem == 1) {
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_INPUT, "Points", "", "Select", "Cancel");            // deze inputbox dus. daar zet ik een getal in en doe select waardoor
}

}
return 1;
}

if(dialogid == DIALOGID+1)
{
new s[128];
format(s,sizeof(s),"Points: %i\n\nCost: %i$",Quantity,gCheckout[playerid]);
ShowPlayerDialog(playerid, DIALOGID+3,0,"lolzzzz",s,"Buy","Cancel");                           	//Dit verschijnt. dit geeft een totaal van de kosten. zodra ik buy doe, zou er geld af moeten gaan.
}
else if(dialogid == DIALOGID+3 && CurrMoney >= gCheckout[playerid]) 
{
   new PointsStringbought[128];
format(PointsStringbought,sizeof(PointsStringbought),"You have bought %i Points for $%i",PointsQuantity,gCheckout[playerid]);
GivePlayerMoney(playerid,-gCheckout[playerid]);
 return 1;
   }
   else if(dialogid == DIALOGID+3 && CurrMoney <= gCheckout[playerid])
   {
   SendClientMessage(playerid,COLOR_BLUE,"You do not have enough money.");
return 1;
}
return 0;
}

Hij gaat wel naar DIALOG+3 met de BUY button, maar hij haalt geen geld van me af en verzend me geen berichten. hoe kan ik dit fixen?

Edited by thuron

Featured Replies

No posts to show

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.