/enter, /exit, system/commands.
#1

I've been trying to make some kind of a enter/exit system but it seems to be pretty confusing.
This is the code I've been using so far (Only the /enter cmd) but I'd like to know if there is a more simple way to do this:

pawn Код:
if(strcmp(cmdtext, "/enter", true) ==0)
        {
            if(IsPlayerInRangeOfPoint(playerid , 1.3 , -217.6554, 979.0903, 19.5029))
            {
            SetPlayerInterior(playerid , 6);
            SetPlayerVirtualWorld(playerid, 2);
            SetPlayerPos(playerid , 246.783996 , 63.900199 , 1003.640625);
    return 1;
    }
    }

    if(strcmp(cmdtext, "/enter", true) ==0)
        {
            if(IsPlayerInRangeOfPoint(playerid , 1.3 , -207.2017,1119.1793,20.4297))
            {
            SetPlayerInterior(playerid , 4);
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerPos(playerid , -27.312299,-29.277599,1003.557250);
    return 1;
    }
    }
And I can't get the /exit command working the same way..
I tried this include: [FS] • [eSystem]: Entrances and Exits builder v0.1 • (http://forum.sa-mp.com/showthread.ph...983&highlight=[eSystem]), but I was just wondering how to make the /enter and /exit cmds since I assume there are no premade ones in that script and I couldn't really get a hold of it when I read the topic.

So could someone tell me a simple way to do this or hook me up with some include or something? Cheers!
Reply
#2

Quote:
Originally Posted by Heisenbergx2
Посмотреть сообщение
I've been trying to make some kind of a enter/exit system but it seems to be pretty confusing.
This is the code I've been using so far (Only the /enter cmd) but I'd like to know if there is a more simple way to do this:

pawn Код:
if(strcmp(cmdtext, "/enter", true) ==0)
        {
            if(IsPlayerInRangeOfPoint(playerid , 1.3 , -217.6554, 979.0903, 19.5029))
            {
            SetPlayerInterior(playerid , 6);
            SetPlayerVirtualWorld(playerid, 2);
            SetPlayerPos(playerid , 246.783996 , 63.900199 , 1003.640625);
    return 1;
    }
    }

    if(strcmp(cmdtext, "/enter", true) ==0)
        {
            if(IsPlayerInRangeOfPoint(playerid , 1.3 , -207.2017,1119.1793,20.4297))
            {
            SetPlayerInterior(playerid , 4);
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerPos(playerid , -27.312299,-29.277599,1003.557250);
    return 1;
    }
    }
And I can't get the /exit command working the same way..
I tried this include: [FS] • [eSystem]: Entrances and Exits builder v0.1 • (http://forum.sa-mp.com/showthread.ph...983&highlight=[eSystem]), but I was just wondering how to make the /enter and /exit cmds since I assume there are no premade ones in that script and I couldn't really get a hold of it when I read the topic.

So could someone tell me a simple way to do this or hook me up with some include or something? Cheers!
You made /enter Commands two Times. You didn't make /exit Command lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)