/votemap help.
#1

i want to use this command once per round. i added the command /votemap in the callback in which round starts. but it is showing an error.

pawn Код:
(555) : error 017: undefined symbol "cmdtext"

pawn Код:
public StartedNewRound(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SpawnPlayer ( i ) ;
        switch ( Map )
        {
            case 0:{
                GameMinutes =5;
                GameSeconds =0;
                if(!strcmp(cmdtext, "/votemap", true))
                {
                ShowPlayerDialog(playerid,GM,DIALOG_STYLE_LIST,"[SvR] Map Voting"," Map 1: \n Map 2: \n Map 3:\n Map 4:\n Map 5:\n Map 6: \n Map 7:","Select","Cancel");
                }
                else return SendClientMessage(playerid, 0x0259EAAA, "you can use this command once per round!");
            }
Reply
#2

pawn Код:
public StartedNewRound(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SpawnPlayer ( i ) ;
        switch ( Map )
        {
            case 0:
            {
                GameMinutes =5;
                GameSeconds =0;
                new cmd[256];
                if(!strcmp(cmd, "/votemap", true))
                {
                ShowPlayerDialog(playerid,GM,DIALOG_STYLE_LIST,"[SvR] Map Voting"," Map 1: \n Map 2: \n Map 3:\n Map 4:\n Map 5:\n Map 6: \n Map 7:","Select","Cancel");
                }
                else return SendClientMessage(playerid, 0x0259EAAA, "you can use this command once per round!");
            }
try this
Reply
#3

nah, that won't work Devilxz97.
He'll have to split it up, he can't use cmd functions inside another function you have to use it within the OnPlayerCommandText() callback

He could do it like:
when it's time to vote he sets a local variable to 1, and in the command it checks if the varible is one, othervise it sends a error message, then he use local variables to store what map they voted on to, and when the timer fucntion is set he change to that map or something

Hoe you understand something
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)