I need some help with a goto command and gethere
#2

pawn Code:
#if !defined isnull
    #define isnull(%1) \
                ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif

dcmd_goto(playerid, params[])
{
    if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,COLOR_RED,"You need to be level 2 to use this command!");
    if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /Goto < Player ID >");

    new
        pID = strval(params),
        Float: iPos[3];

    GetPlayerPos(pID, iPos[0], iPos[1], iPos[2]);
    SetPlayerPos(playerid, iPos[0], iPos[1], iPos[2] + 3);

    new
        iStr[50],
        pIDN[24];

    GetPlayerName(pID, pIDN, sizeof(pIDN));

    format(iStr, sizeof(iStr), "You've teleported to: %s", pIDN);
    return SendClientMessage(playerid, -1, iStr);
}

dcmd_gethere(playerid, params[])
{
    if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,COLOR_RED,"You need to be level 2 to use this command!");
    if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /Gethere < Player ID >");
   
    new
        pID = strval(params),
        Float: iPos[3];

    GetPlayerPos(playerid, iPos[0], iPos[1], iPos[2]);
    SetPlayerPos(pID, iPos[0], iPos[1], iPos[2] + 3);
   
    new
        iStr[50],
        pIDN[24];

    GetPlayerName(pID, pIDN, sizeof(pIDN));

    format(iStr, sizeof(iStr), "You've teleported: %s to you", pIDN);
    return SendClientMessage(playerid, -1, iStr);
}
Reply


Messages In This Thread
I need some help with a goto command and gethere - by Shockey HD - 19.07.2011, 04:26
Re: I need some help with a goto command and gethere - by [L3th4l] - 19.07.2011, 04:47
Re: I need some help with a goto command and gethere - by Shockey HD - 19.07.2011, 04:55
Re: I need some help with a goto command and gethere - by Skaizo - 19.07.2011, 05:20
Re: I need some help with a goto command and gethere - by Shockey HD - 19.07.2011, 05:23
Re: I need some help with a goto command and gethere - by coole210 - 19.07.2011, 06:01
Re: I need some help with a goto command and gethere - by Shockey HD - 19.07.2011, 07:29

Forum Jump:


Users browsing this thread: 1 Guest(s)