[HELP ME PLEASE!!!] My script wont ready any command i make
#1

Hey i made a command for a gate to move all worked and so on but then 2days later i come back to it and it just stoped working so i made a post about it and nothing would work. today i got a new filterscript on a house system and my server wont read the commands from that as well so now i am guessing it somthing to do with my server or somthing ( I started a new script and stil nothing happend). Can some one please help me thanks
Reply
#2

Is the gate command using 'strcmp'? Is the house system filterscript using zcmd? If so, they will conflict. Blocking your strcmp commands.
Reply
#3

The gate command would not work with out any filterscripts on as well i put the gate command on a new script the one that worked and when i join game and all that i do /open ( Opens tha gate ) all i get is 'unknown command'
Reply
#4

post some code of the commands
Reply
#5

My question is, why do you want to use strcmp still when you got ZCMD(if you do) makes no sense.
Reply
#6

If it's only not working when you load the FS, make sure you have return 0 at the bottom of OnPlayerCommandText.
Reply
#7

He said he gets Unknown command, and the gates still open ?
Have you put return 1; at the end of cmd:
pawn Код:
ThisIsACommand ( ... )
{
    //Stuff here
    return 1; // THIS IS WHAT I MEANT
}
?
If you haven't put the return 1, command will work, but it will say Unknown command
Also return 0 at the END of your OnPlayerCommandText:
pawn Код:
public OnPlayerCommandText ( playerid, cmdtext[ ] )
{
    command1
    {
        return true;
    }
    command2
    {
        return true;
    }
    return 0; // I MEANT THIS
}
Reply
#8

I dont think its any thing to do wtih the code for the gate any more as i ran a blank script from the SAMP Server pack thing and ran a house FS with it and the FS would not work at all the Server boot up thing said it loaded it but when i do the command to make a house it says uknown command any command i make it says that its as id the server dont wont any commands though it might be my plugins are wrong? as the plug in section says:
Loading plugin: dini
Failed
Loaded 0 plugins

when it should have the plugins for sscanf, streamer, zcmd, dudb and dini does any one have the download link for this plugins? if i am wrong please say
Reply
#9

http://pastebin.com/j903KVfV This is a link to the gate command ( Though its doing this thing to fs on a blank script )
Reply
#10

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/open", true) == 0) { // Edit the /eup to your elevator command.
{ // Wtf is this, you put an open bracket in here ^^
    MoveObject(LSPDGate,1592.5999755859,-1638.0615234375,12.37318611145,2.00); // Put your cords in here
    SendClientMessage(playerid, 0xFFFFFFFF, "The gate is opening...."); // You dont alwas have to put this in, delete if wanted.
}
return 1; // return 1 after cmd is closed?
}
if(strcmp(cmdtext,"/close", true) == 0) { // Same deal as before
        MoveObject(LSPDGate,1584.7800292969,-1638.0615234375,12.37318611145,2.00); // Same deal as before
        SendClientMessage(playerid, 0xFFFFFFFF, "The gate is closeing."); // You dont alwas have to put this in, delete if wanted.
        }
return 1; // returning 1 in onplayercommandtext ? WTF
        }
FIXED version:
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if ( strcmp( cmdtext,"/open", true ) == 0 )
    {
        MoveObject ( LSPDGate,1592.5999755859,-1638.0615234375,12.37318611145,2.00 );
        SendClientMessage ( playerid, 0xFFFFFFFF, "The gate is opening...." );
        return 1;
    }
    if ( strcmp( cmdtext,"/close", true ) == 0 )
    {
        MoveObject ( LSPDGate,1584.7800292969,-1638.0615234375,12.37318611145,2.00 );
        SendClientMessage ( playerid, 0xFFFFFFFF, "The gate is closeing." );
        return 1;
    }
    return 0; // MUST RETURN 0
}
ALSO: DINI is not a plugin!
That return 1 in OnPlayerCommandText made some conflicts, be careful what you return next time!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)