BUY SLOT with Ammo Packs ZP [ Rezolvat ]

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
kerasseN
Membru, skill 0
Membru, skill 0
Posts: 8
Joined: 04 Feb 2020, 00:00
Detinator Steam: Da
CS Status: Invatacel AMXX
Detinator server CS: ZM.CODATII.RO
SteamID: kazzen24
Fond eXtream: 0

19 May 2020, 19:43

Plugin Cerut: BUY SLOT with Ammo Packs ZP
Descriere (adica ce face el mai exact):

Sa fie un menu care se deschide folosind o comanda "/buyslot", iar in acel meniu sa ii apara BUY SLOT - %s Ammo Packs
Daca are suma de 10000 Ammo Packs sa isi poata cumpara slot pe server adica nume rezervat flag "b", Daca nu are suma de 1000 AP sa ii dea un mesaj cu "nu ai suficiente ammo pack", de preferat comanda sa nu apara in chat cand o folosesti sa iti deschida direct menu !

Un exemplu

Code: Select all

MENU BUY ACCES
1. BUY SLOT (Slot Rezervation) - 10000 Ammo Packs

si pe tasta 0 sa iasa din menu =D
Serverul impune conditii strict HLDS/REHLDS?: nu cred
Ai cautat pluginul?(daca da, precizeaza cum): l-am catat peste tot nu gasesc nimic...
Necesita mod special?: zombie plague pe modu asta sa mearga
Last edited by WHOAMI? on 28 May 2020, 14:03, edited 1 time in total.
Reason: Marcat ca "Rezolvat"
Zonek
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2968
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 39 times
Been thanked: 454 times
Contact:

19 May 2020, 20:38

Code: Select all

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <zombieplague>

const COST_SLOT = 10000
new const FLAG_SLOT[] = "b"
new const NUME_MENU[] = "MENU TO BUY ACCES"
new const FIRST_ITEM_MENU[] = "BUY SLOT - [ 10000 Ammo Packs ]"
new const MY_PW[] = "epw"

public plugin_init() {
	// Add your code here...
	register_clcmd("say /buyslot","BS")
	register_clcmd("say_team /buyslot","BS")
	register_clcmd ( MY_PW, "cmdPassword" );
}

public BS(id)
{
	if(get_user_flags(id)&ADMIN_RESERVATION)	return 1
	
	new menu=menu_create(NUME_MENU,"SH")
	menu_additem(menu,FIRST_ITEM_MENU)
	menu_display(id,menu)
	
	return 1
}
public SH(id,menu,item)
{
	if(item==0)
	{
		if(zp_get_user_ammo_packs(id)<COST_SLOT)	return
		zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id)-COST_SLOT)
		client_cmd ( id, "messagemode %s",MY_PW );
		client_print(id,print_chat,"	TI-A APARUT UN LOC IN COLTUL DE STANGA SUS. ACOLO APARE PAROLA TASTATA!")
	}
}
public cmdPassword ( id )
{
	new szArg[ 15 ];
	read_argv( 1, szArg, charsmax ( szArg ) );
	if( !strlen( szArg ) || 15 > strlen( szArg ) < 6 )
	{
		client_print(id,print_chat,"	PAROLA CONTULUI TREBUIE SA FIE DE MINIM 6 & MAXIM 15 CARACTERE")
		client_cmd( id, "messagemode %s",MY_PW);
		return PLUGIN_HANDLED;
	}
	new name[32];	get_user_name(id,name,charsmax(name))
	new frsmdeforum[10]
	get_cvar_string("amx_password_field",frsmdeforum,charsmax(frsmdeforum))
	set_user_info(id,frsmdeforum,szArg)
	server_cmd("amx_addadmin ^"%s^" %s ^"%s^" name",name,FLAG_SLOT,szArg)
	server_cmd("amx_reloadadmins")
	return PLUGIN_HANDLED;
}
Faceți cerere bine detaliată aici și respectând modelul dacă vreți ajutor. Nu-mi mai dați add doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz!
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici, iar dacă sunt ceva probleme sau aveți dvs. probleme nu ezitați să luați legătura cu mine.
HOST CS1.6
User avatar
kerasseN
Membru, skill 0
Membru, skill 0
Posts: 8
Joined: 04 Feb 2020, 00:00
Detinator Steam: Da
CS Status: Invatacel AMXX
Detinator server CS: ZM.CODATII.RO
SteamID: kazzen24
Fond eXtream: 0

19 May 2020, 20:42

Code: Select all

{
	new szArg[ 15 ];
	read_argv( 1, szArg, charsmax ( szArg ) );
	if( !strlen( szArg ) || 15 > strlen( szArg ) < 6 )
	{
		client_print(id,print_chat,"	PAROLA CONTULUI TREBUIE SA FIE DE MINIM 6 & MAXIM 15 CARACTERE")
		client_cmd( id, "messagemode %s",MY_PW);
		return PLUGIN_HANDLED;
	}
	new name[32];	get_user_name(id,name,charsmax(name))
	server_cmd("amx_addadmin ^"%s^" %s ^"%s^" name",name,FLAG_SLOT,szArg)
	new ***[10] <----- !!!!!!!!!!! DE AICI PROVINE PROBLEMA !!!!!!!!
	get_cvar_string("amx_password_field",***,charsmax(***))
	set_user_info(id,***,szArg)
	server_cmd("amx_reloadadmins")
	return PLUGIN_HANDLED;
}
Error: Invalid symbol name "" on line 49
Error: Invalid expression, assumed zero on line 49
Warning: Expression has no effect on line 49
Error: Expected token: ";", but found "]" on line 49
Error: Too many error messages on one line on line 49

Compilation aborted.
4 Errors.
Could not locate output file C:\Documents and Settings\DM\Desktop\zp_plugins_buy_slot.amx (compile failed).
User avatar
kerasseN
Membru, skill 0
Membru, skill 0
Posts: 8
Joined: 04 Feb 2020, 00:00
Detinator Steam: Da
CS Status: Invatacel AMXX
Detinator server CS: ZM.CODATII.RO
SteamID: kazzen24
Fond eXtream: 0

21 May 2020, 16:19

Ma mai ajuta cineva?
User avatar
EnTeR_
Membru, skill +1
Membru, skill +1
Posts: 476
Joined: 13 Sep 2014, 15:36
Detinator Steam: Da
Fond eXtream: 0
Been thanked: 4 times

21 May 2020, 17:01

Pluginul se compileaza! Mai incearca.
Discord: EyeKon#3230
ZackChoi
Membru, skill 0
Membru, skill 0
Posts: 55
Joined: 28 Dec 2019, 01:39
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Been thanked: 5 times

21 May 2020, 18:40

Code: Select all

/* Plugin generated by AMXX-Studio */

#include <amxmodx>

native zp_get_user_ammo_packs(id)
native zp_set_user_ammo_packs(id, num);

const COST_SLOT = 10000
new const FLAG_SLOT[] = "b"
new const NUME_MENU[] = "MENU TO BUY ACCES"
new const FIRST_ITEM_MENU[] = "BUY SLOT - [ 10000 Ammo Packs ]"
new const MY_PW[] = "epw"

public plugin_init() {
	// Add your code here...
	register_clcmd("say /buyslot","BS")
	register_clcmd("say_team /buyslot","BS")
	register_clcmd ( MY_PW, "cmdPassword" );
}

public BS(id)
{
	if(get_user_flags(id)&ADMIN_RESERVATION)	return 1
	
	new menu=menu_create(NUME_MENU,"SH")
	menu_additem(menu,FIRST_ITEM_MENU)
	menu_display(id,menu)
	
	return 1
}
public SH(id,menu,item)
{
	if(item==0)
	{
		if(zp_get_user_ammo_packs(id)<COST_SLOT)	return
		zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id)-COST_SLOT)
		client_cmd ( id, "messagemode %s",MY_PW );
		client_print(id,print_chat,"	TI-A APARUT UN LOC IN COLTUL DE STANGA SUS. ACOLO APARE PAROLA TASTATA!")
	}
}
public cmdPassword ( id )
{
	new szArg[ 15 ];
	read_argv( 1, szArg, charsmax ( szArg ) );
	if( !strlen( szArg ) || 15 > strlen( szArg ) < 6 )
	{
		client_print(id,print_chat,"	PAROLA CONTULUI TREBUIE SA FIE DE MINIM 6 & MAXIM 15 CARACTERE")
		client_cmd( id, "messagemode %s",MY_PW);
		return PLUGIN_HANDLED;
	}
	new name[32];	get_user_name(id,name,charsmax(name))
	new frsmdeforum[10]
	get_cvar_string("amx_password_field",frsmdeforum,charsmax(frsmdeforum))
	set_user_info(id,frsmdeforum,szArg)
	server_cmd("amx_addadmin ^"%s^" %s ^"%s^" name",name,FLAG_SLOT,szArg)
	server_cmd("amx_reloadadmins")
	return PLUGIN_HANDLED;
}
Your plugin successfully compiled!
Use the link below to download your plugin. It will be valid for ten minutes.

http://www.amxmodx.org/webcompiler.cgi?go=dl&id=2103349
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Header size: 464 bytes
Code size: 1548 bytes
Data size: 1376 bytes
Stack/heap size: 16384 bytes; estimated max. usage=68 cells (272 bytes)
Total requirements: 19772 bytes
Done.
User avatar
kerasseN
Membru, skill 0
Membru, skill 0
Posts: 8
Joined: 04 Feb 2020, 00:00
Detinator Steam: Da
CS Status: Invatacel AMXX
Detinator server CS: ZM.CODATII.RO
SteamID: kazzen24
Fond eXtream: 0

21 May 2020, 23:21

Merge dar puteti va rog sa ii adaugati si

Code: Select all

if(is_user_admin(id)) 
	{
		client_print(id, print_chat, "You have already purchased slot !");
		return 1;
	}

	if(zp_get_user_ammo_packs(id) < COST_SLOT) 
	{
		client_print(id, print_chat, "You don't have enough credits to buy this. You need 5.000 Credits !");
		return 1;
	}
Daca nu are suficiente credite sa ii dea mesaju ala

Code: Select all

 "You don't have enough credits to buy this. You need 5.000 Credits !
iar daca are deja admin sau slot sa ii apara asta

Code: Select all

"You have already purchased slot !");

Am incercat eu dar nu a mers am pus alea si nu aparea nimic dac anu aveam ammo necesar iar daca un admin voia sa cumpere tot nu aparea nimic ! =(
User avatar
kerasseN
Membru, skill 0
Membru, skill 0
Posts: 8
Joined: 04 Feb 2020, 00:00
Detinator Steam: Da
CS Status: Invatacel AMXX
Detinator server CS: ZM.CODATII.RO
SteamID: kazzen24
Fond eXtream: 0

22 May 2020, 20:59

Va rog, cineva ?
User avatar
EnTeR_
Membru, skill +1
Membru, skill +1
Posts: 476
Joined: 13 Sep 2014, 15:36
Detinator Steam: Da
Fond eXtream: 0
Been thanked: 4 times

22 May 2020, 23:29

kerasseN wrote:
22 May 2020, 20:59
Va rog, cineva ?
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <zombieplague>

const COST_SLOT = 10000
new const FLAG_SLOT[] = "b"
new const NUME_MENU[] = "MENU TO BUY ACCES"
new const FIRST_ITEM_MENU[] = "BUY SLOT - [ 10000 Ammo Packs ]"
new const MY_PW[] = "epw"

public plugin_init() {
	// Add your code here...
	register_clcmd("say /buyslot","BS")
	register_clcmd("say_team /buyslot","BS")
	register_clcmd ( MY_PW, "cmdPassword" );
}

public BS(id)
{
	if(get_user_flags(id)&ADMIN_RESERVATION)
	{
		client_print(id, print_chat, "You have already purchased slot !");

		return 1
	}
	
	new menu=menu_create(NUME_MENU,"SH")
	menu_additem(menu,FIRST_ITEM_MENU)
	menu_display(id,menu)
	
	return 1
}
public SH(id,menu,item)
{
	if(item==0)
	{
		if(zp_get_user_ammo_packs(id)<COST_SLOT)
		{
			client_print(id, print_chat, "You don't have enough credits to buy this. You need 5.000 Credits !");

			return
		}

		zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id)-COST_SLOT)
		client_cmd ( id, "messagemode %s",MY_PW );
		client_print(id,print_chat,"	TI-A APARUT UN LOC IN COLTUL DE STANGA SUS. ACOLO APARE PAROLA TASTATA!")
	}
}
public cmdPassword ( id )
{
	new szArg[ 15 ];
	read_argv( 1, szArg, charsmax ( szArg ) );
	if( !strlen( szArg ) || 15 > strlen( szArg ) < 6 )
	{
		client_print(id,print_chat,"	PAROLA CONTULUI TREBUIE SA FIE DE MINIM 6 & MAXIM 15 CARACTERE")
		client_cmd( id, "messagemode %s",MY_PW);
		return PLUGIN_HANDLED;
	}
	new name[32];	get_user_name(id,name,charsmax(name))
	new frsmdeforum[10]
	get_cvar_string("amx_password_field",frsmdeforum,charsmax(frsmdeforum))
	set_user_info(id,frsmdeforum,szArg)
	server_cmd("amx_addadmin ^"%s^" %s ^"%s^" name",name,FLAG_SLOT,szArg)
	server_cmd("amx_reloadadmins")
	return PLUGIN_HANDLED;
}
Discord: EyeKon#3230
User avatar
kerasseN
Membru, skill 0
Membru, skill 0
Posts: 8
Joined: 04 Feb 2020, 00:00
Detinator Steam: Da
CS Status: Invatacel AMXX
Detinator server CS: ZM.CODATII.RO
SteamID: kazzen24
Fond eXtream: 0

23 May 2020, 13:47

Sa iti dea dumnezeu sanatate ! Rezolvat!
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests