Simple /enter and /exit CMD's
#1

Well.. many formats of /enter and /exit commands are Complicated and not easy to use , so i was looking for an easy format...and not a Complicated Cmd *Note : i want the CMD works ONLY when player at point and same to /exit CMD , if you can do it in a Fromat Code it would be greate, Thanks
Reply
#2

pawn Код:
CMD:enter(playerid, cmdtext[])
{
    if(IsPlayerInRangeOfPoint(playerid, range, x, y, z)
    {
        // Codes here
    }
    else if (IsPlayerInRangeOfPoint(playerid, range, x, y, z)
    {
        // Other codes here
    }
    else if (IsPlayerInRangeOfPoint(playerid, range, x, y, z)
    {
        // Again, other codes here
    } else return SendClientMessage(playerid, -1, "You are not in range of the 3 places above");
    return 1;
}
This one uses ZCMD, change it to dcmd, strcmp, anything you want.
Reply
#3

Can't you just make it like:

pawn Код:
CMD:enter(playerid)
{
    IsPlayerInRangeOfPoint(playerid, 10, X, Y, Z...)
    {
     SetPlayerPos(playerid, x2, y2, z2);
    }

and so on, for every location the co-ordinates of the entrance, and the final destination. use search to find that isplayerinrangeofpoint code...
}
Crap, Wesley was faster xD
Reply
#4

can you use strcmp ?
Reply
#5

Just change "CMD:enter(playerid)" to "if(!strcmp(cmdtext, "/enter", true, 6))".
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)