Changing scripts id
#1

Can someone teach me how to change script id? I cant find any tutorial that teaches that.

When I add Votekick script, then /v does not work. If I add speedometer, then /lmenu does not work, so I need to learn how to change that id so it will all work together. So, can someone please teach me this? And please, explain carefully
Reply
#2

OnPlayerCommandText callback in every script should return 0; in order make commands from every script work at the same time.
Reply
#3

So if I understand u correctly, I have a votekick fs that is not working with others. This is the code
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if(!strcmp("/votekick", cmdtext, true))
            {
                    if(IsVoteKickStarted == true) return SendClientMessage(playerid, COLOR_ERROR,"[ERROR:] {BBBBBB}A votekick has been already started. Wait until it finish to ask for a new one");
                    ShowPlayerDialog(playerid, DIALOG_VOTEKICK, DIALOG_STYLE_INPUT, "{C14124}V{BBBBBB}otekick", "{BBBBBB}Type player's {C14124}ID{BBBBBB} or {C14124}Nick{BBBBBB} you want to votekick.", "VoteKick", "Cancel");
                    return 1;
            }
            return 1;
    }
Change that to

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {
            if(!strcmp("/votekick", cmdtext, true))
            {
                    if(IsVoteKickStarted == true) return SendClientMessage(playerid, COLOR_ERROR,"[ERROR:] {BBBBBB}A votekick has been already started. Wait until it finish to ask for a new one");
                    ShowPlayerDialog(playerid, DIALOG_VOTEKICK, DIALOG_STYLE_INPUT, "{C14124}V{BBBBBB}otekick", "{BBBBBB}Type player's {C14124}ID{BBBBBB} or {C14124}Nick{BBBBBB} you want to votekick.", "VoteKick", "Cancel");
                    return 1;
            }
            return 0;
    }
And then it will work?
Reply
#4

Hopefully, it will do.
Reply
#5

You talking about dialog ids or you have conflict with command processors?
Reply
#6

watch at the last post: http://forum.sa-mp.com/showthread.ph...t=loaded+stack ... i tried to "explain" it, if its causing your trouble... anyways it could be the same reason in the OnPlayerCommandText() callback. (having the OPCT returning in the last loaded FS) - if you entirely switch to ZCMD, this wont happen anymore
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)