[AJUDA]: /ir e /trazer
#4

pawn Код:
dcmd_ir(playerid,params[])
    {
        if(PlayerData[playerid][AdminLevel] >= 1)
        {
        new name[24], admin[24], string[128], str[128];
        new idx,tmpit[256];
        tmpit = strtok(params,idx);
        if(!strlen(tmpit))
        {
            SendClientMessage(playerid,COLOR_GREY,"Use: /ir [playerid]");
            return true;
        }
        new pid = strval(tmpit);
        if(!IsPlayerConnected(pid))
        {
            SendClientMessage(playerid,COLOR_GREY,"ID Invбlido");
            return true;
        }
        new Float:playerpos[4],pint;
        GetPlayerPos(pid,playerpos[0],playerpos[1],playerpos[2]);
        GetPlayerFacingAngle(pid,playerpos[3]);
        pint = GetPlayerInterior(pid);
        if(playerpos[3] > 180.0)
        {
            playerpos[3]-=180.0;
        }
        else
        {
            playerpos[3]+=180.0;
        }
        GetXYBehindPlayer(pid,playerpos[0],playerpos[1],3.0);
        SetPlayerPos(playerid,playerpos[0],playerpos[1],playerpos[2]);
        SetPlayerFacingAngle(playerid,playerpos[3]);
        SetPlayerFacingAngle(playerid,playerpos[3]);
        SetPlayerInterior(playerid,pint);
        GetPlayerName(playerid, admin, sizeof(admin));
        GetPlayerName(pid, name, sizeof(name));
        format(string, sizeof(string),"Voce foi atй o Player %s", name);
        format(str, sizeof(str),"O Admin %s foi atй Voce!", admin);
        SendClientMessage(playerid, -1, string);
        SendClientMessage(pid, -1, str);
        return true;
        }
        else return SendClientMessage(playerid,COLOR_RED, "[INFO]: Vocк nгo й ADM");
    }

    dcmd_trazer(playerid,params[])
    {
        new name[24], admin[24], string[128], str[128];
        if(PlayerData[playerid][AdminLevel] >= 3)
        {
        new idx,tmpit[256];
        tmpit = strtok(params,idx);

        if(!strlen(tmpit))
        {
            SendClientMessage(playerid,COLOR_GREY,"Use: /trazer [playerid]");
            return true;
        }
        new pid = strval(tmpit);

        if(!IsPlayerConnected(pid))
        {
            SendClientMessage(playerid,COLOR_GREY,"ID INvбlido");
            return true;
        }
        new Float:playerpos[4],pint;
        GetPlayerPos(playerid,playerpos[0],playerpos[1],playerpos[2]);
        GetPlayerFacingAngle(playerid,playerpos[3]);
        pint = GetPlayerInterior(playerid);
        format(string, sizeof(string),"Voce puxou o Player %s", name);
        format(str, sizeof(str),"O Admin %s te puxou atй ele!", admin);
        SendClientMessage(playerid, -1, string);
        SendClientMessage(pid, -1, str);
        if(playerpos[3] > 180.0)
        {
            playerpos[3]-=180.0;
        }
        else
        {
            playerpos[3]+=180.0;
        }
        GetXYInFrontOfPlayer(playerid,playerpos[0],playerpos[1],3.0);
        SetPlayerPos(pid,playerpos[0],playerpos[1],playerpos[2]);
        SetPlayerFacingAngle(pid,playerpos[3]);
        SetPlayerInterior(pid,pint);
        SendClientMessage(playerid,COLOR_WHITE,"Vocк trouxe o jogador atй vocк");
        return true;
        }
        else return SendClientMessage(playerid,COLOR_RED, "[INFO]: Vocк nгo й ADM");
Se der erro me avisa!
Reply


Messages In This Thread
[AJUDA]: /ir e /trazer - by GhosT_[] - 06.06.2012, 00:29
Re: [AJUDA]: /ir e /trazer - by kinhobryant - 06.06.2012, 00:36
Re: [AJUDA]: /ir e /trazer - by mau.tito - 06.06.2012, 00:38
Re: [AJUDA]: /ir e /trazer - by blacktrindade - 06.06.2012, 00:39
Re: [AJUDA]: /ir e /trazer - by GhosT_[] - 06.06.2012, 17:21

Forum Jump:


Users browsing this thread: 1 Guest(s)