Raised This Month: $ Target: $400
 0% 

Few questions from idiot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 10-25-2012 , 20:08   Re: String as a table in MySQL part
Reply With Quote #8

Okay guys. Sorry for not answear, my work didn't allow me for it. I did it, that was only a fucked up string.

PS there's quotes like this ' ' doesn't work in MySQL, you have to use ` `. That's why i had a little mish mash in my head, because i did try quotes, but the first ones.

Now, to not opening new topic will ask shortly. I did download that plugin http://forums.alliedmods.net/showthread.php?p=1824790 (version light). And i did try to change it. It works like that, if i have buyed a slot, then that menu dont allow me to buy a slot again, because it says me the rest of my slot's time. It's okay, but i did try to change it. That what i wanted to do is to allow you to click a slot to buy, but if you already have it, it says you that. I thought it gonna work, but when compiling theres no others errors than one "Error 100: Function Prototypes do not match"

And that what i've changed is:

This:
PHP Code:
public Action:CommandLP(clientargs)
{
    new 
Handle:menu CreateMenu(MenuHandler);
    
SetMenuTitle(menu"Loyalty Point System");
    
AddMenuItem(menu"1""Show LP");
    
    if (
HaveClientRS(client))
    {
        new 
String:s_menu5[100];
        new 
client_rsmin GetRSMIN(client);
        if (
client_rsmin <= 60)
        {
            
Format(s_menu5sizeof(s_menu5), "Your RS access end in %i min"GetRSMIN(client));
        }
        else if (
client_rsmin <= 1440)
        {
            
Format(s_menu5sizeof(s_menu5), "Your RS access end in %i h"GetRSMIN(client)/60);
        }
        else
        {
            
Format(s_menu5sizeof(s_menu5), "Your RS access end in %i d"GetRSMIN(client)/1440);
        }
        
AddMenuItem(menu"6"s_menu5ITEMDRAW_DISABLED);
    }
    else
    {
        
AddMenuItem(menu"7""Reserved Slot");
    }
    
    
DisplayMenu(menuclientMENU_TIME_FOREVER);
    
    return 
Plugin_Handled;

To this:
PHP Code:
public Action:CommandLP(clientargs)
{
    new 
Handle:menu CreateMenu(MenuHandler);
    
SetMenuTitle(menu"Loyalty Point System");
    
AddMenuItem(menu"1""Show LP");
    
AddMenuItem(menu"7""Reserved Slot");

    return 
Plugin_Handled;


And this:
PHP Code:
public MenuRS(Handle:menuMenuAction:actionparam1param2)
{
    if (
action == MenuAction_Select)
    {
        new 
String:info[32];
        
GetMenuItem(menuparam2infosizeof(info));
        
        new 
lp GetLP(param1)
        
        switch(
StringToInt(info))
        {
            case 
1:
            {
                if (
lp >= price_rs_1day)
                {
                    
RemoveLP(param1price_rs_1day)
                    
GiveRS(param11440);
                    
                    if (
IsClientInGame(param1))
                    {
                        
PrintToChat(param1"\x04[LP]\x01 You have bought RS! If Server is full, connect by console to use your reserved slot.")
                    }
                }
                else 
                {
                    
PrintToChat(param1"\x04[LP]\x01 You have %i lp, but you need %i for 1 Day RS!"lpprice_rs_1day);
                }
            }
            case 
2:........ 
To this:
PHP Code:
public MenuRS(Handle:menuMenuAction:actionparam1param2client)
{
    if (
action == MenuAction_Select)
    {
        new 
String:info[32];
        
GetMenuItem(menuparam2infosizeof(info));
        
        new 
lp GetLP(param1)
        
        switch(
StringToInt(info))
        {
            case 
1:
            {if (
HaveClientRS(client))
            {
                    
PrintToChat(param1"You already have a slot");
            }
            else
            {
                    if (
lp >= price_rs_1day)
                    {
                        
RemoveLP(param1price_rs_1day)
                        
GiveRS(param11440);
                    
                        if (
IsClientInGame(param1))
                        {
                            
PrintToChat(param1"\x04[LP]\x01 You have bought RS! If Server is full, connect by console to use your reserved slot.")
                        }
                    }
                    else 
                    {
                        
PrintToChat(param1"\x04[LP]\x01 You have %i lp, but you need %i for 1 Day RS!"lpprice_rs_1day);
                    }
                }
            }
            case 
2:... 
The full code of that plugin you can check in the link above. Can anyone tell me how to fix it?

Last edited by LambdaLambda; 10-25-2012 at 20:16.
LambdaLambda is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode