SA-MP Forums Archive
Whats wrong with /specplayer cmd? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong with /specplayer cmd? (/showthread.php?tid=245704)



Whats wrong with /specplayer cmd? - GBLTeam - 01.04.2011

Whats wrong in this command ? Why JunkBuster ban when someone use /specplayer id.. Please help me really need to fix this..

pawn Код:
dcmd_specplayer(playerid, params[])
{
    new Giveplayerid, Name[256], String[256], Name2[256];
    if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGm] >= 1)
    {
    if (sscanf(params, "d", Giveplayerid)) SendClientMessage(playerid,COLOR_WHITE, "SERVER: /specplayer [Playerid]");
    else if (!IsPlayerConnected(Giveplayerid)) SendClientMessage(playerid,COLOR_PURPLE,"Player not connected?");
    else
    {
    if ( Specing[Giveplayerid] == 1 )
    {
    SendClientMessage(playerid, COLOR_RED, "   The person you have tried to spec is spectating someone else.");
    }
    else
    {
    GetPlayerName(playerid, Name, 256);
    GetPlayerName(Giveplayerid, Name2, 256);
    format(String, 256, "[%i] %s is now spectating [%i] %s",playerid, Name,Giveplayerid, Name2);
    CallLocalFunction("ircRemoteSay", "iss", 1, "#FSE", String);
    Specing[playerid] = 1;
    }
    if ( !IsPlayerInAnyVehicle(Giveplayerid) )
    {
    TogglePlayerSpectating(playerid, 1);
    PlayerSpectatePlayer(playerid, Giveplayerid);
    SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
    return 1;
    }
    else
    {
    TogglePlayerSpectating(playerid, 1);
    PlayerSpectateVehicle(playerid, GetPlayerVehicleID(Giveplayerid));
    SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
    return 1;
    }
    }
    }
    return 1;
}

dcmd_specoff(playerid, params[])
{
    #pragma unused params
    TogglePlayerSpectating(playerid, 0);
    SetTimerEx("PosAfterSpec",3000,0,"d",playerid);
    if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGm] >= 1)
    {
        if(Specing[playerid] != 0)
        {
            Specing[playerid] = 0;
            GivePlayerMoney(playerid,100)
        }
        else
        {
        SendClientMessage(playerid,COLOR_WHITE,"Trenutno nikoga ne specujete");
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "   Niste ovlasteni da koristite tu komandu !");
    }
    return 1;
}



Re: Whats wrong with /specplayer cmd? - GBLTeam - 02.04.2011

anyone really need to fix this JunkBuster ban adm who type /specplayer..