/spec help.
#1

The spectating part works, but when you type /spec for another player it keeps flickering back and changing players at random. Also when a person types /specoff your screen flickers and custom made objects reload them selfs causing yourself to fall through.

Also, what kind of functions would i use to make it scroll through players when they press the left mouse button.

Thanks in advance.
pawn Код:
command(spec, playerid, params[])                
{
    if(GetPlayerAdmin(playerid) < 1) return SendBlockedAdminCommand(playerid, 1);
    new id;
    if(!strlen(params)) return SendClientMessage(playerid,0xFF0000AA, "USAGE: /Spec [ID]");
    {
        id = strval(params);
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000AA, "Player not connected.");
        {
            if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA, "You are not admin!");
            {
                TogglePlayerSpectating(playerid, 1);
                new string[50];
                format(string, sizeof(string), "Money: %d", GetPlayerMoney(id));
                GameTextForPlayer(playerid, string, 10000, 6);
                SpecTimer[playerid] = SetTimerEx("SpecUpdate", 3000, true, "ii", playerid, id);
                if(IsPlayerInAnyVehicle(id)) {
                    PlayerSpectateVehicle(playerid, GetPlayerVehicleID(id));
                    IsIn[playerid] = CAR;
                }
                else {
                    PlayerSpectatePlayer(playerid, id);
                    IsIn[playerid] = ONFOOT;
                }
            }
        }
    }
    return 1;
}

command(specoff,playerid, params[])
{
    if(GetPlayerAdmin(playerid) < 1) return SendBlockedAdminCommand(playerid, 1);
    #pragma unused params
    TogglePlayerSpectating(playerid, 0);
    return 1;
}
Reply


Messages In This Thread
/spec help. - by Haydz - 14.12.2010, 05:00
Re: /spec help. - by [NWA]Hannes - 14.12.2010, 07:11
Re: /spec help. - by Haydz - 14.12.2010, 07:31
Re: /spec help. - by TheInnocentOne - 14.12.2010, 07:50
Re: /spec help. - by Haydz - 16.12.2010, 06:14

Forum Jump:


Users browsing this thread: 1 Guest(s)