SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 21/10/2010, 07:47 PM   #1
Castle
Huge Clucker
 
Castle's Avatar
 
Join Date: Aug 2008
Posts: 331
Reputation: 0
Default [SOLVED] SERVER: Unknown Command. - Can't figure out the reason for it..

I know I'm scripting in very old fashion, but for testing stuff especially gate and shit i prefer that way.
here's my command: http://pastebin.com/HNd11L9r
Could someone point me to the reason that is causing that shit?
__________________

Last edited by Castle; 21/10/2010 at 09:25 PM.
Castle is offline  
Old 21/10/2010, 08:30 PM   #2
Mauzen
High-roller
 
Mauzen's Avatar
 
Join Date: Jun 2007
Location: Western Germany
Posts: 4,877
Reputation: 1597
Default Re: SERVER: Unknown Command. - Can't figure out the reason for it..

pawn Code:
if(pdss!=1)//LSPD Garage Shutter
       {
                if(PlayerToPoint(10,playerid,1592.720337,-1638.043579,14.911348))
                {
                        MoveObject(pds,1592.720337,-1638.043579,9.612303,3);
                        pdss=1;
                        SetTimer("AutoClose",5000,0);
                }
                return 1;
        }
        else return SendClientMessage(playerid,COLOR_GREY,"The gate is already open or you are too far.");
Do it like this for all cmds. The problem is, if pdss!=1, but the playertopoint stuff is false, it also wont call the else stuff, so it wont return anything.
Mauzen is offline  
Old 21/10/2010, 08:31 PM   #3
CJ101
High-roller
 
CJ101's Avatar
 
Join Date: Jan 2008
Location: RevolutionX
Posts: 1,758
Reputation: 162
Default Re: SERVER: Unknown Command. - Can't figure out the reason for it..

You are not returning 1 when you close the command.
__________________
I have left SA-MP. Thanks for a great ten years.
CJ101 is offline  
Old 21/10/2010, 08:49 PM   #4
HrvojeCro
Big Clucker
 
Join Date: Oct 2009
Location: Croatia
Posts: 92
Reputation: 0
Default Re: SERVER: Unknown Command. - Can't figure out the reason for it..

pawn Code:
if(pdss!=1)//LSPD Garage Shutter
       {
                if(PlayerToPoint(10,playerid,1592.720337,-1638.043579,14.911348))
                {
                        MoveObject(pds,1592.720337,-1638.043579,9.612303,3);
                        pdss=1;
                        SetTimer("AutoClose",5000,0);
                }
                return 1;
        }
        else SendClientMessage(playerid,COLOR_GREY,"The gate is already open or you are too far.");
return 1;
}
I edited 4 you
but heres how i do with commands
pawn Code:
if(strcmp("/openirtgrg", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 25.0, 755.948486, -1337.448364, 15.041857))
    {
        if(gTeam[playerid] != TEAM_IRT)
            return SendClientMessage(playerid, 0xEF994300, "you dont work in Interglobal Radio-Television!");
        MoveObject(irtgarage, 755.948486, -1337.448364, 10.816921, 1);
        SendClientMessage(playerid, 0xEF994300, "garage is opening...");
    }
    else
    {
        SendClientMessage(playerid, 0xEF994300, "youre not near garage!");
    }
    return 1;
    }
HrvojeCro is offline  
Old 21/10/2010, 09:18 PM   #5
Castle
Huge Clucker
 
Castle's Avatar
 
Join Date: Aug 2008
Posts: 331
Reputation: 0
Default Re: SERVER: Unknown Command. - Can't figure out the reason for it..

Thanks guys, it works now.
__________________
Castle is offline  
 

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SERVER: Unknown Command when using a scripted command and it does execute! Moustafa Help Archive 6 11/06/2010 01:34 PM
Command that returns SERVER: Unknown Command. pagie1111 Help Archive 11 11/04/2010 09:55 AM
Server crashes unknown reason Jimmyhead521 Help Archive 1 30/12/2009 11:55 PM
Unknown Reason for Server Restart..... Outbreak Help Archive 13 12/08/2009 08:20 PM


All times are GMT. The time now is 07:48 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.