Junior Member
Join Date: Aug 2017
Location: Warsaw, Europe
|
09-15-2017
, 02:51
Error with my store
|
#1
|
Hi Guys,
I want make my own store which will using credit's from Zephyrus's store. Please help me I don't know what's wrong is with my shop
Code:
Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <store>
public void OnPluginStart()
{
RegConsoleCmd("sm_sklep", Menu_Sklep);
RegAdminCmd("sm_vipsklep", Menu_VipSklep, ADMFLAG_CUSTOM1);
RegConsoleCmd("sm_ocochodzi", Menu_OcoChodzi);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////PRE MENU/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////
public Action Menu_Sklep(int client, int args)
{
new Handle:menu = CreateMenu(sklepmenu, MenuAction:28);
SetMenuTitle(menu, "Sklep By NWayne | HardStrike.EU");
AddMenuItem(menu, "1", "Sklep");
AddMenuItem(menu, "2", "Sklep dla VIP'a");
AddMenuItem(menu, "3", "O co tu chodzi?");
SetMenuExitButton(menu, true);
DisplayMenu(menu, client, 250);
return Plugin_Handled;
}
public sklepmenu(Handle:classhandle, MenuAction:action, client, Position)
{
if(action == MenuAction_Select)
{
new String:Item[32];
GetMenuItem(classhandle, Position, Item, sizeof(Item));
if(StrEqual(Item, "1"))
{
SklepNorm(client, 0);
}
if(StrEqual(Item, "2"))
{
FakeClientCommandEx(client, "sm_vipsklep");
}
if(StrEqual(Item, "3"))
{
FakeClientCommandEx(client, "sm_ocochodzi");
}
}
else if (action == MenuAction_End);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////Normal Sklep//////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
public Action SklepNorm(int client, int args)
{
Menu menu = CreateMenu(sklepgracza);
menu.SetTitle("Sklep Gracza | HardStrike.EU")
menu.AddItem("1", "+20HP [100 Credits]");
menu.AddItem("2", "Predkosc [125 Credits]");
menu.AddItem("3", "Grawitacja [200 Credits]");
menu.AddItem("4", "Respawn [150 Credits]");
menu.ExitButton = true;
menu.Display(client, 60);
}
public sklepgracza(Menu menu, MenuAction action, int client, int Position)
{
if(action == MenuAction_Select)
{
char Item[32];
GetMenuItem(menu, Position, Item, sizeof(Item));
if(StrEqual(Item, "1"))
{
if (GetCredits > 150)
{
if (!IsPlayerAlive(client) && GetClientTeam(client) > 1)
{
PrintToChat(client, "[SKLEP] Kupiles respawn. Baw się dobrze :D ");
CS_RespawnPlayer(client);
Store_SetClientCredits(client, Store_GetClientCredits(client) -150);
}
}
else PrintToChat(client, "[SKLEP] Nie masz wystarczajacej ilosci kredytow");
}
if (StrEqual(Item, "2"));
{
}
if (StrEqual(Item, "3"));
{
}
if (StrEqual(Item, "4"));
{
}
}
else if (action == MenuAction_End);
CloseHandle(sklepgracza, classhandle);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////VIP Sklep/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public Action Menu_VipSklep(int client, int args)
{
Menu menu = CreateMenu(sklepvip);
menu.SetTitle("Sklep VIP'a | HardStrike.EU")
menu.AddItem("1", "+20HP [100 Credits]");
menu.AddItem("2", "Predkosc [125 Credits]");
menu.AddItem("3", "Grawitacja [200 Credits]");
menu.AddItem("4", "Respawn [150 Credits]");
menu.ExitButton = true;
menu.Display(client, 60);
}
public sklepvip(Handle:classhandle, MenuAction:action, client, Position)
{
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////Informacje///////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public Action Menu_OcoChodzi(int client, int args)
{
PrintToChat(client, "\x02 [SKLEP] \x04 ============================================== \x01");
PrintToChat(client, "\x02 [SKLEP] \x04 W sklepie funkcjonuje waluta o nazwie kredyty.\x01");
PrintToChat(client, "\x02 [SKLEP] \x04 Ilość swoich kredytów możesz sprawdzić pod komendą !credits. \x01");
PrintToChat(client, "\x02 [SKLEP] \x04 Za kredyty możesz zakupić różne dodatki. Wszystkie dodatki są tylko na 1 runde \x01");
PrintToChat(client, "\x02 [SKLEP] \x04 ============================================== \x01");
}
stock int GetCredits(int client)
{
return Store_GetClientCredits(client);
}
Error's:
Quote:
nwayne_sklep.sp
C:\Users\kordi\Desktop\nwayne_sklep.sp(50) : error 036: empty statement
C:\Users\kordi\Desktop\nwayne_sklep.sp(73) : warning 217: loose indentation
C:\Users\kordi\Desktop\nwayne_sklep.sp(75) : warning 217: loose indentation
C:\Users\kordi\Desktop\nwayne_sklep.sp(77) : error 100: function prototypes do not match
C:\Users\kordi\Desktop\nwayne_sklep.sp(8 : error 036: empty statement
C:\Users\kordi\Desktop\nwayne_sklep.sp(92) : error 036: empty statement
C:\Users\kordi\Desktop\nwayne_sklep.sp(96) : error 036: empty statement
C:\Users\kordi\Desktop\nwayne_sklep.sp(102) : warning 217: loose indentation
C:\Users\kordi\Desktop\nwayne_sklep.sp(102) : error 036: empty statement
C:\Users\kordi\Desktop\nwayne_sklep.sp(103) : warning 217: loose indentation
C:\Users\kordi\Desktop\nwayne_sklep.sp(103) : error 130: cannot coerce functions to values
C:\Users\kordi\Desktop\nwayne_sklep.sp(6) : warning 203: symbol is never used: "g_cvarChatTag"
ukonczone
|
|
|