SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 12/11/2010, 02:24 PM   #11
M.5
Little Clucker
 
Join Date: Sep 2010
Posts: 7
Reputation: 0
Default Re: enter commands wont work -.-

This code is when you are near door press ENTER this goes intu the house without any command. Just use your cordinates!
M.5 is offline  
Old 12/11/2010, 03:03 PM   #12
XePloiT
Huge Clucker
 
XePloiT's Avatar
 
Join Date: Nov 2010
Posts: 299
Reputation: 0
Default Re: enter commands wont work -.-

try to remove the 10 after the true...
Code:
if(strcmp("/enter", cmdtext, true, 10) ==0)
AFTER:
Code:
if(strcmp("/enter", cmdtext, true) ==0)
__________________
You can find me as "AlExEy" in other forums and places.
"Sex is always the answer, it's never a question,'Cause the answer is yes"
Code:
[ r? ] - 0% [ rAdmin + rBank ] - 99% [ rVehHouse - rHouse + rVehicle ] - 99% [ rWeapon + rExp ] - 5% [ rClan ] - 50% The Whole [ rSystem ] - 63% 100% Dynamic & 100% MySql Database Why 99%? - Cuz Nothin' is Perfect. Releases: rVote - Voting/Poll Script

XePloiT is offline  
Old 12/11/2010, 04:25 PM   #13
Rafa
Huge Clucker
 
Join Date: Oct 2010
Location: Skopje, Macedonia
Posts: 280
Reputation: 0
Default Re: enter commands wont work -.-

dude mauby u have another command like /enter in ur server ... o_0
Rafa is offline  
Old 12/11/2010, 05:14 PM   #14
Scenario
Godfather
 
Scenario's Avatar
 
Join Date: Feb 2010
Location: Heaven
Posts: 7,811
Reputation: 701
Default Re: enter commands wont work -.-

You may be mixing ZCMD and STRCMP and if you are, that's why it won't work.
__________________



Scenario is offline  
Old 12/11/2010, 05:46 PM   #15
HrvojeCro
Big Clucker
 
Join Date: Oct 2009
Location: Croatia
Posts: 92
Reputation: 0
Default Re: enter commands wont work -.-

Quote:
Originally Posted by XePloiT View Post
try to remove the 10 after the true...
Code:
if(strcmp("/enter", cmdtext, true, 10) ==0)
AFTER:
Code:
if(strcmp("/enter", cmdtext, true) ==0)
wont work

Quote:
Originally Posted by M.5 View Post
This code is when you are near door press ENTER this goes intu the house without any command. Just use your cordinates!
sounds good give me a link of tutorial how to do that

Quote:
Originally Posted by Rafa View Post
dude mauby u have another command like /enter in ur server ... o_0
no i dont

Quote:
Originally Posted by RealCop228 View Post
You may be mixing ZCMD and STRCMP and if you are, that's why it won't work.
no, strcmp is something that I use as more as it is possible, and what im trying to do is to make more /enter commands in 1 place... so /enter command is usable only when IsPlayerInRangeOfPoint1 blahblah, IsPlayerInRangeOfPoint2.... and so on
HrvojeCro is offline  
Old 12/11/2010, 05:58 PM   #16
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,130
Reputation: 3
Default Re: enter commands wont work -.-

pawn Code:
if(!strcmp(cmdtext, "/enter", true))
{
    if(IsPlayerInRangeOfPoint(playerid, 5.0, 2207.5254, -1100.4119, 31.5547))
    {
        SetPlayerPos(playerid, 2209.3159,-1106.1302,14.9276);
        SetPlayerFacingAngle(playerid, 68.2839);
        SetCameraBehindPlayer(playerid);
        SetPlayerInterior(playerid, 10);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1412.0670,-1699.9690,13.5395))
    {
        SetPlayerPos(playerid, 1417.3789,-989.1111,1639.7843);
        SetPlayerFacingAngle(playerid, 269.2184);
        SetCameraBehindPlayer(playerid);
        SetPlayerInterior(playerid, 10);
    }
    return 1;
}

It works fine for me.
__________________
The_Moddler is offline  
Old 12/11/2010, 06:01 PM   #17
Mean
High-roller
 
Join Date: Jul 2010
Location: 14th annual lemon party
Posts: 2,730
Reputation: 229
Default Re: enter commands wont work -.-

Delete the return 1; on the first if not else if
The_Moddler's code should work
__________________
I'm pretty much the creator of the PUB: macro used in many scripts today, therefore I'm a legitimate genius.

Ground breaking stuff
Quote:
Originally Posted by ******
I've met Mean on a few occasions in real life, a true genius and a 400 pound all-muscle gorilla alpha male. He has had a great influence on my life.
Quote:
Originally Posted by Kalcor
I don't know where I'd be today without Mean. He has helped me through some tough times in my life. He always brings a smile to my face. Such a positive lad!
Mean is offline  
Old 12/11/2010, 06:12 PM   #18
HrvojeCro
Big Clucker
 
Join Date: Oct 2009
Location: Croatia
Posts: 92
Reputation: 0
Default Re: enter commands wont work -.-

Quote:
Originally Posted by Mean View Post
Delete the return 1; on the first if not else if
The_Moddler's code should work
ok ill try this 2 examples when I come home(2 hours of fce english lessons 2 hours after school -.- didnt want to go home so came to dads office )-->
Quote:
Originally Posted by The_Moddler View Post
pawn Code:
if(!strcmp(cmdtext, "/enter", true))
{
    if(IsPlayerInRangeOfPoint(playerid, 5.0, 2207.5254, -1100.4119, 31.5547))
    {
        SetPlayerPos(playerid, 2209.3159,-1106.1302,14.9276);
        SetPlayerFacingAngle(playerid, 68.2839);
        SetCameraBehindPlayer(playerid);
        SetPlayerInterior(playerid, 10);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1412.0670,-1699.9690,13.5395))
    {
        SetPlayerPos(playerid, 1417.3789,-989.1111,1639.7843);
        SetPlayerFacingAngle(playerid, 269.2184);
        SetCameraBehindPlayer(playerid);
        SetPlayerInterior(playerid, 10);
    }
    return 1;
}

It works fine for me.
ty Ill try that btw why !strcmp??
Quote:
Originally Posted by ColdXX View Post
Well the try this
pawn Code:
if(strcmp( cmdtext,"/enter", true) ==0)////////////////////////////////////////
        {
            if(IsPlayerInRangeOfPoint(playerid, 5.0, 2207.5254,-1100.4119,31.5547))//--House00000---
                {
                    SetPlayerPos(playerid, 2209.3159,-1106.1302,14.9276);
                    SetPlayerFacingAngle(playerid, 68.2839);
                    SetCameraBehindPlayer(playerid);
                    SetPlayerInterior(playerid, 10);
                   }
                   return 1;
                }//--------------------------------------------------------------------------------
                if(strcmp( cmdtext,"/enter", true) ==0)
                {
                if(IsPlayerInRangeOfPoint(playerid, 5.0, 1412.0670,-1699.9690,13.5395))//--Bank001---
                {
                    SetPlayerPos(playerid, 1417.3789,-989.1111,1639.7843);
                    SetPlayerFacingAngle(playerid, 269.2184);
                    SetCameraBehindPlayer(playerid);
                    SetPlayerInterior(playerid, 10);
                    }
                   return 1;
                }
        }//--------------------------------------------------------------------------------
    return 0;
}
Ill try that too ty guys hope 1 will work cuz this is already annoying
HrvojeCro is offline  
Old 12/11/2010, 06:22 PM   #19
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,130
Reputation: 3
Default Re: enter commands wont work -.-

Quote:
Originally Posted by HrvojeCro View Post
ok ill try this 2 examples when I come home(2 hours of fce english lessons 2 hours after school -.- didnt want to go home so came to dads office )-->


ty Ill try that btw why !strcmp??


Ill try that too ty guys hope 1 will work cuz this is already annoying
This won't even work..

I used !strcmp because strcmp returns 0 if the comparsion of both strings are the same.
__________________
The_Moddler is offline  
Old 12/11/2010, 08:32 PM   #20
HrvojeCro
Big Clucker
 
Join Date: Oct 2009
Location: Croatia
Posts: 92
Reputation: 0
Default Re: enter commands wont work -.-

doesn't work -.-
HrvojeCro 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
[HELP] /enter and /exit COmmands RASTAFARIAN Help Archive 5 20/09/2010 09:18 PM
Commands wont work WardenCS Help Archive 2 05/04/2010 07:11 PM
[HELP] Commands wont work... Smiths Help Archive 21 12/03/2010 11:49 PM


All times are GMT. The time now is 12:12 PM.


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