[HELP]Vjetpack command
#5

I left it where it was before and it's working , but now I have other problem I tried to convert a strcmp to zcmd

here is the zcmd (not working)
pawn Код:
CMD:vgoto[playerid, params[])
{
    new sendername[MAX_PLAYER_NAME],string[256];
    if(IsPlayerConnected(playerid))
    {
        tmp = strtok(cmdtext, idx);
        if(strlen(params))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /vgoto [playerid/PartOfName]");
            return 1;
        }
        new Float:plocx,Float:plocy,Float:plocz;
        new plo;
        plo = ReturnUser(params);
        if (IsPlayerConnected(plo))
        {
            if(plo != INVALID_PLAYER_ID)
            {
                if (PlayerInfo[playerid][pVip] >= 2)
                {
                    if(Spectate[playerid] != 255)
                    {
                        Spectate[playerid] = 256;
                    }
                    GetPlayerPos(plo, plocx, plocy, plocz);
                    if(PlayerInfo[plo][pInt] > 0)
                    {
                        SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
                        PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
                        PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
                    }
                    if(PlayerInfo[playerid][pInt] == 0)
                    {
                        SetPlayerInterior(playerid,0);
                        SetPlayerVirtualWorld(playerid, 0);
                    }
                    if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0)
                    {
                        SetPlayerInterior(playerid,1);
                        PlayerInfo[playerid][pInt] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                    }
                    if (GetPlayerState(playerid) == 2)
                    {
                        new tmpcar = GetPlayerVehicleID(playerid);
                        SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                        TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                    }
                    else
                    {
                        SetPlayerPos(playerid,plocx,plocy+2, plocz);
                    }
                    SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffd700}Ai fost Teleportat cu succes.");
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, 256, ""#GAlbastru"[Suceava-RPG]: {800080}Vip {059e42}[%s]{ffffff} a folosit comanda {f70f0f}[/vgoto]", sendername);
                    SendAdminMessage(COLOR_LIGHTRED,string);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda.");
                }
            }
        }
        else
        {
            format(string, sizeof(string), ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar acest jucator nu este Online.", plo);
            SendClientMessage(playerid, COLOR_GRAD1, string);
        }
    }
    return 1;
}
and here is the strcmp working
pawn Код:
if(strcmp(cmd, "/vgoto", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /vgoto [playerid/PartOfName]");
            return 1;
        }
        new Float:plocx,Float:plocy,Float:plocz;
        new plo;
        plo = ReturnUser(tmp);
        if (IsPlayerConnected(plo))
        {
            if(plo != INVALID_PLAYER_ID)
            {
                if (PlayerInfo[playerid][pVip] >= 2)
                {
                    if(Spectate[playerid] != 255)
                    {
                        Spectate[playerid] = 256;
                    }
                    GetPlayerPos(plo, plocx, plocy, plocz);
                    if(PlayerInfo[plo][pInt] > 0)
                    {
                        SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
                        PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
                        PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
                    }
                    if(PlayerInfo[playerid][pInt] == 0)
                    {
                        SetPlayerInterior(playerid,0);
                        SetPlayerVirtualWorld(playerid, 0);
                    }
                    if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0)
                    {
                        SetPlayerInterior(playerid,1);
                        PlayerInfo[playerid][pInt] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                    }
                    if (GetPlayerState(playerid) == 2)
                    {
                        new tmpcar = GetPlayerVehicleID(playerid);
                        SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                        TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                    }
                    else
                    {
                        SetPlayerPos(playerid,plocx,plocy+2, plocz);
                    }
                    SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffd700}Ai fost Teleportat cu succes.");
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, 256, ""#GAlbastru"[Suceava-RPG]: {ffffff}Vip {059e42}[%s]{ffffff} a folosit comanda {f70f0f}[/vgoto]", sendername);
                    SendAdminMessage(COLOR_LIGHTRED,string);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda.");
                }
            }
        }
        else
        {
            format(string, sizeof(string), ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar acest jucator nu este Online.", plo);
            SendClientMessage(playerid, COLOR_GRAD1, string);
        }
    }
    return 1;
}
And it's not working to compile it doesn't give any errors just not working . Why ?
Reply


Messages In This Thread
[HELP]Vjetpack command - by Kirchhoff - 21.05.2013, 08:17
Re: [HELP]Vjetpack command - by DobbysGamertag - 21.05.2013, 08:25
Re: [HELP]Vjetpack command - by Kirchhoff - 21.05.2013, 08:27
Re: [HELP]Vjetpack command - by BenTaylorUK - 21.05.2013, 08:42
Re: [HELP]Vjetpack command - by Kirchhoff - 21.05.2013, 08:48
Re: [HELP]Vjetpack command - by edzis84 - 21.05.2013, 09:23

Forum Jump:


Users browsing this thread: 1 Guest(s)