Make these commands to work faster..
#1

Hey,
Atm I only know how to make commands with dcmd.. And idk.. some commands take about 2-4 seconds to process..
Here are two of them:

pawn Код:
dcmd_goto(playerid,params[]) // This command teleports me to player
{
    if (dUserINT(PlayerName(playerid)).("Adminlvl")>=2)
    {
        new id, Float:x,Float:y,Float:z;
        if (sscanf(params, "u", id)) UsageMsg(playerid, "USAGE: /goto <PlayerID/PartOfName>");
        else if (id == INVALID_PLAYER_ID) ErrorMsg(playerid, "Player not found");
        else
        {
            GetPlayerPos(id,x,y,z);
            new interior = GetPlayerInterior(id);
            SetPlayerInterior(playerid,interior);
            SetPlayerPos(playerid,x,y+2,z+1);
        }
    }
    return 1;
}

dcmd_getplayer(playerid,params[]) //This command teleports player to me
{
    if (dUserINT(PlayerName(playerid)).("Adminlvl")>=2)
    {
        new id, Float:x,Float:y,Float:z;
        if (sscanf(params, "u", id)) UsageMsg(playerid, "USAGE: /getplayer <PlayerID/PartOfName>");
        else if (id == INVALID_PLAYER_ID) ErrorMsg(playerid, "Player not found");
        else
        {
          if (IsPlayerInAnyVehicle(id)) RemovePlayerFromVehicle(id);
            GetPlayerPos(playerid,x,y,z);
            SetPlayerPos(id,x,y+2,z+1);
        }
    }
    return 1;
}
So is it possible to make them to work faster?
Reply


Messages In This Thread
Make these commands to work faster.. - by SiJ - 17.07.2009, 18:41
Re: Make these commands to work faster.. - by Vince - 17.07.2009, 19:10
Re: Make these commands to work faster.. - by Anarkien - 17.07.2009, 19:12
Re: Make these commands to work faster.. - by SiJ - 17.07.2009, 19:40
Re: Make these commands to work faster.. - by Andom - 17.07.2009, 19:51
Re: Make these commands to work faster.. - by SiJ - 17.07.2009, 19:52
Re: Make these commands to work faster.. - by Rac3r - 17.07.2009, 21:04
Re: Make these commands to work faster.. - by SiJ - 17.07.2009, 21:32
Re: Make these commands to work faster.. - by Rac3r - 18.07.2009, 05:10

Forum Jump:


Users browsing this thread: 9 Guest(s)