Raised This Month: $51 Target: $400
 12% 

votemap custom plugin fix CSGO


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alexcsgo
New Member
Join Date: Feb 2015
Old 02-12-2015 , 01:01   votemap custom plugin fix CSGO
Reply With Quote #1

please someone could correct me errors plugin and that sends the following errors:


/groups/sourcemod/upload_tmp/textjhTYvj.sp(43) : error 023: array assignment must be simple assignment
/groups/sourcemod/upload_tmp/textjhTYvj.sp(64) : error 017: undefined symbol "RecentMap"
/groups/sourcemod/upload_tmp/textjhTYvj.sp(66) : error 047: array sizes do not match, or destination array is too small
/groups/sourcemod/upload_tmp/textjhTYvj.sp(61) : warning 203: symbol is never used: "stay"


explanation of plugin: the plugin is a votemap that starts when the server recibel the "votemap_iniciar" command when the voting starts receiving lasts 10 seconds after the voting ends and sm_nextmap "mapwinner" sets the command

and when changing map and it restarts the vote, played the last two maps played do not appear on the voting.


Please fix errors..

This is the code:

PHP Code:
#include <sourcemod>
#include <sdktools>

public Plugin:myinfo =
{
    
name "D",
    
author "D",
    
description "D",
    
version "1.0",
    
url "D"
};

public 
OnPluginStart()
{
    
RegAdminCmd("votemap_iniciar"Command_voteADMFLAG_SLAY);
}

public 
Handle_VoteMenu(Handle:menuMenuAction:actionparam1param2)
{
    if (
action == MenuAction_End)
    {
        
CloseHandle(menu);
    } 
    else if (
action == MenuAction_VoteEnd
    {
        if (
param1 == 0)
        {
            new 
String:map[64];
            
GetMenuItem(menuparam1mapsizeof(map));
            
ServerCommand("sm_nextmap %s"map);
        }
    }
}

public 
Action:Command_vote(clientargs)
{
    if (
IsVoteInProgress())
    {
        return;
    }
    
    new 
String:maps[5][25];
    
maps VoteMaps();
    new 
Handle:menu CreateMenu(Handle_VoteMenu);
    
SetMenuTitle(menu"Votemap");
    for(new 
i=05i++)
    {
        
AddMenuItem(menumaps[i], maps[i])
    }
    
SetMenuExitButton(menufalse);
    
VoteMenuToAll(menu20);
}

String:VoteMaps()
{
    
decl String:path[PLATFORM_MAX_PATH], String:line[128];
    
BuildPath(Path_SMpathPLATFORM_MAX_PATH"maplist.txt");
    new 
Handle:fileHandle=OpenFile(path"r");
    new 
String:maps[5][25];
    new 
i=0;
    new 
bool:stay;
    
    
ReadFileLine(fileHandlelinesizeof(line))
    while(!
IsEndOfFile(fileHandle) && !RecentMap(line))
    {
        
maps[i] = line;
        
ReadFileLine(fileHandlelinesizeof(line))
        
i++;
    }
    
    
CloseHandle(fileHandle);
    return 
maps;

thx..

Last edited by alexcsgo; 02-12-2015 at 01:02.
alexcsgo is offline
Reply



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 19:53.


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