Raised This Month: $60 Target: $400
 15% 

compile problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
generals
Senior Member
Join Date: Aug 2018
Old 10-14-2019 , 06:18   compile problem
Reply With Quote #1

can any one help me to compile this :

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma semicolon 1

new String:mSEAGULL[20] = "models/seagull.mdl";
new 
String:mPIGEON[20] = "models/pigeon.mdl";
new 
bool:hooked;
new 
birdindex[15];

public 
OnMapStart()
{
    
decl String:sBuffer[32];
    
GetCurrentMap(sBuffer32);
    if (!
strcmp(sBuffer"de_dust2"true))
    {
        
hooked true;
        
HookEvent("round_start"RoundStartEventHookMode:2);
        
CreateTimer(15.0birdsongany:03);
        
PrecacheModel(mSEAGULLfalse);
        
PrecacheModel(mPIGEONfalse);
        new 
1;
        while (
21)
        {
            
FormatEx(sBuffer32"ambient/animal/bird%d.wav"i);
            
PrecacheSound(sBufferfalse);
            
i++;
        }
    }
}

public 
Action:birdsong(Handle:timer)
{
    
decl i;
    
decl String:sBuffer[32];
    
decl Float:origin[3];
    
0;
    while (
15)
    {
        if (
GetRandomInt(1100) > 80)
        {
            
FormatEx(sBuffer32"ambient/animal/bird%d.wav"GetRandomInt(120));
            
GetEntPropVector(birdindex[i], PropType:0"m_vecOrigin"origin0);
            
EmitAmbientSound(sBufferoriginbirdindex[i], 7501.01000.0);
        }
        if (
GetRandomInt(1100) > 87)
        {
            
GetEntPropString(birdindex[i], PropType:1"m_ModelName"sBuffer320);
            new 
var2;
            if (
sBuffer[1] == 's')
            {
                new 
var1;
                if (
GetRandomInt(01) == 1)
                {
                    
var1 1988;
                }
                else
                {
                    
var1 1992;
                }
                
var2[0] = var1;
            }
            else
            {
                if (
GetRandomInt(01) == 1)
                {
                    
var2[0] = 2000;
                }
                
var2[0] = 2008;
            }
            
Format(sBuffer6"%s"var2);
            
SetVariantString(sBuffer);
            
AcceptEntityInput(birdindex[i], "SetAnimation", -1, -10);
        }
        
i++;
    }
    return 
Action:0;
}

public 
RoundStart(Handle:eventString:name[], bool:dontBroadcast)
{
    
decl i;
    
decl func_rot;
    
decl bird;
    
0;
    
decl String:sTargetName[32];
    
decl String:sSpeed[8];
    
decl String:sModel[32];
    new 
birdspeed;
    new 
Float:angels[3] = 0.0;
    new 
bool:reverse;
    while (
15)
    {
        
func_rot CreateEntityByName("func_rotating", -1);
        
DispatchKeyValueVector(func_rot"origin"func_rot_coords[i]);
        
birdspeed GetRandomInt(1418);
        
FormatEx(sSpeed6"%d"birdspeed);
        
FormatEx(sTargetName32"gull_%d"func_rot);
        
DispatchKeyValue(func_rot"targetname"sTargetName);
        
DispatchKeyValue(func_rot"spawnflags""64");
        
DispatchKeyValue(func_rot"maxspeed"sSpeed);
        
DispatchSpawn(func_rot);
        
reverse GetRandomInt(1100) > 85;
        if (
reverse)
        {
            new 
z;
            while (
3)
            {
                
angels[z] = birds_angels[i][z];
                
z++;
            }
            switch (
angels[1])
            {
                case 
0:
                {
                    
angels[1] = 180.0;
                }
                case 
1119092736:
                {
                    
angels[1] = 270.0;
                }
                case 
1132920832:
                {
                    
angels[1] = 90.0;
                }
                default:
                {
                }
            }
        }
        
bird CreateEntityByName("prop_dynamic_override", -1);
        
DispatchKeyValueVector(bird"origin"birds_coords[i]);
        new 
var1;
        if (
reverse)
        {
            
var1[0] = angels;
        }
        else
        {
            
var1[0] = birds_angels[i];
        }
        
DispatchKeyValueVector(bird"angles"var1);
        new 
var2;
        if (
GetRandomInt(1100) > 80)
        {
            
var2[0] = 1796;
        }
        else
        {
            
var2[0] = 1776;
        }
        
FormatEx(sModel32var2);
        
DispatchKeyValue(bird"model"sModel);
        new 
var4;
        if (
sModel[1] == 's')
        {
            new 
var3;
            if (
birdspeed 16)
            {
                
var3 2160;
            }
            else
            {
                
var3 2164;
            }
            
var4[0] = var3;
        }
        else
        {
            if (
birdspeed 16)
            {
                
var4[0] = 2172;
            }
            
var4[0] = 2180;
        }
        
FormatEx(sSpeed6"%s"var4);
        
DispatchKeyValue(bird"DefaultAnim"sSpeed);
        
DispatchSpawn(bird);
        
SetVariantString(sTargetName);
        
AcceptEntityInput(bird"SetParent", -1, -10);
        
AcceptEntityInput(func_rot"Start", -1, -10);
        if (
reverse)
        {
            
AcceptEntityInput(func_rot"Reverse", -1, -10);
        }
        
birdindex[i] = bird;
        
i++;
    }
    return 
0;
}

public 
OnMapEnd()
{
    if (
hooked)
    {
        
UnhookEvent("round_start"RoundStartEventHookMode:2);
        
hooked false;
    }
    return 
0;

generals is offline
OhHai
Junior Member
Join Date: Aug 2019
Old 10-14-2019 , 07:10   Re: compile problem
Reply With Quote #2

Quote:
Originally Posted by generals View Post
can any one help me to compile this :

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma semicolon 1

new String:mSEAGULL[20] = "models/seagull.mdl";
new 
String:mPIGEON[20] = "models/pigeon.mdl";
new 
bool:hooked;
new 
birdindex[15];

public 
OnMapStart()
{
    
decl String:sBuffer[32];
    
GetCurrentMap(sBuffer32);
    if (!
strcmp(sBuffer"de_dust2"true))
    {
        
hooked true;
        
HookEvent("round_start"RoundStartEventHookMode:2);
        
CreateTimer(15.0birdsongany:03);
        
PrecacheModel(mSEAGULLfalse);
        
PrecacheModel(mPIGEONfalse);
        new 
1;
        while (
21)
        {
            
FormatEx(sBuffer32"ambient/animal/bird%d.wav"i);
            
PrecacheSound(sBufferfalse);
            
i++;
        }
    }
}

public 
Action:birdsong(Handle:timer)
{
    
decl i;
    
decl String:sBuffer[32];
    
decl Float:origin[3];
    
0;
    while (
15)
    {
        if (
GetRandomInt(1100) > 80)
        {
            
FormatEx(sBuffer32"ambient/animal/bird%d.wav"GetRandomInt(120));
            
GetEntPropVector(birdindex[i], PropType:0"m_vecOrigin"origin0);
            
EmitAmbientSound(sBufferoriginbirdindex[i], 7501.01000.0);
        }
        if (
GetRandomInt(1100) > 87)
        {
            
GetEntPropString(birdindex[i], PropType:1"m_ModelName"sBuffer320);
            new 
var2;
            if (
sBuffer[1] == 's')
            {
                new 
var1;
                if (
GetRandomInt(01) == 1)
                {
                    
var1 1988;
                }
                else
                {
                    
var1 1992;
                }
                
var2[0] = var1;
            }
            else
            {
                if (
GetRandomInt(01) == 1)
                {
                    
var2[0] = 2000;
                }
                
var2[0] = 2008;
            }
            
Format(sBuffer6"%s"var2);
            
SetVariantString(sBuffer);
            
AcceptEntityInput(birdindex[i], "SetAnimation", -1, -10);
        }
        
i++;
    }
    return 
Action:0;
}

public 
RoundStart(Handle:eventString:name[], bool:dontBroadcast)
{
    
decl i;
    
decl func_rot;
    
decl bird;
    
0;
    
decl String:sTargetName[32];
    
decl String:sSpeed[8];
    
decl String:sModel[32];
    new 
birdspeed;
    new 
Float:angels[3] = 0.0;
    new 
bool:reverse;
    while (
15)
    {
        
func_rot CreateEntityByName("func_rotating", -1);
        
DispatchKeyValueVector(func_rot"origin"func_rot_coords[i]);
        
birdspeed GetRandomInt(1418);
        
FormatEx(sSpeed6"%d"birdspeed);
        
FormatEx(sTargetName32"gull_%d"func_rot);
        
DispatchKeyValue(func_rot"targetname"sTargetName);
        
DispatchKeyValue(func_rot"spawnflags""64");
        
DispatchKeyValue(func_rot"maxspeed"sSpeed);
        
DispatchSpawn(func_rot);
        
reverse GetRandomInt(1100) > 85;
        if (
reverse)
        {
            new 
z;
            while (
3)
            {
                
angels[z] = birds_angels[i][z];
                
z++;
            }
            switch (
angels[1])
            {
                case 
0:
                {
                    
angels[1] = 180.0;
                }
                case 
1119092736:
                {
                    
angels[1] = 270.0;
                }
                case 
1132920832:
                {
                    
angels[1] = 90.0;
                }
                default:
                {
                }
            }
        }
        
bird CreateEntityByName("prop_dynamic_override", -1);
        
DispatchKeyValueVector(bird"origin"birds_coords[i]);
        new 
var1;
        if (
reverse)
        {
            
var1[0] = angels;
        }
        else
        {
            
var1[0] = birds_angels[i];
        }
        
DispatchKeyValueVector(bird"angles"var1);
        new 
var2;
        if (
GetRandomInt(1100) > 80)
        {
            
var2[0] = 1796;
        }
        else
        {
            
var2[0] = 1776;
        }
        
FormatEx(sModel32var2);
        
DispatchKeyValue(bird"model"sModel);
        new 
var4;
        if (
sModel[1] == 's')
        {
            new 
var3;
            if (
birdspeed 16)
            {
                
var3 2160;
            }
            else
            {
                
var3 2164;
            }
            
var4[0] = var3;
        }
        else
        {
            if (
birdspeed 16)
            {
                
var4[0] = 2172;
            }
            
var4[0] = 2180;
        }
        
FormatEx(sSpeed6"%s"var4);
        
DispatchKeyValue(bird"DefaultAnim"sSpeed);
        
DispatchSpawn(bird);
        
SetVariantString(sTargetName);
        
AcceptEntityInput(bird"SetParent", -1, -10);
        
AcceptEntityInput(func_rot"Start", -1, -10);
        if (
reverse)
        {
            
AcceptEntityInput(func_rot"Reverse", -1, -10);
        }
        
birdindex[i] = bird;
        
i++;
    }
    return 
0;
}

public 
OnMapEnd()
{
    if (
hooked)
    {
        
UnhookEvent("round_start"RoundStartEventHookMode:2);
        
hooked false;
    }
    return 
0;


https://www.sourcemod.net/compiler.php

OR

https://wiki.alliedmods.net/Compiling_SourceMod_Plugins

OR

https://forums.alliedmods.net/showthread.php?t=84741


How easy was that?
OhHai is offline
generals
Senior Member
Join Date: Aug 2018
Old 10-14-2019 , 07:16   Re: compile problem
Reply With Quote #3

i know. bro

i have some error

how can i fixe the errors.. someone can help?
generals is offline
Marttt
Senior Member
Join Date: Jan 2019
Old 10-16-2019 , 12:25   Re: compile problem
Reply With Quote #4

There is too many problems with this code, looks like it is missing a lot of variables declarations, I think nobody can help you.

Would be better if you provide some plugin link related to this code.
__________________
Marttt is offline
Cruze
Veteran Member
Join Date: May 2017
Old 10-16-2019 , 12:53   Re: compile problem
Reply With Quote #5

Looks like code is taken from a decompiled plugin.
__________________
Taking paid private requests! Add me on steam/discord!

AlliedModders Releases | Github | Private Plugins | PayPal | Steam | Discord: Cruze#4947
Cruze is offline
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 10-16-2019 , 14:02   Re: compile problem
Reply With Quote #6

U can't recompile a decompiled plugin
Nexd is offline
Aya Supay
Member
Join Date: Nov 2015
Old 10-16-2019 , 16:41   Re: compile problem
Reply With Quote #7

Quote:
Originally Posted by generals View Post
can any one help me to compile this :

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma semicolon 1

new String:mSEAGULL[20] = "models/seagull.mdl";
new 
String:mPIGEON[20] = "models/pigeon.mdl";
new 
bool:hooked;
new 
birdindex[15];

public 
OnMapStart()
{
    
decl String:sBuffer[32];
    
GetCurrentMap(sBuffer32);
    if (!
strcmp(sBuffer"de_dust2"true))
    {
        
hooked true;
        
HookEvent("round_start"RoundStartEventHookMode:2);
        
CreateTimer(15.0birdsongany:03);
        
PrecacheModel(mSEAGULLfalse);
        
PrecacheModel(mPIGEONfalse);
        new 
1;
        while (
21)
        {
            
FormatEx(sBuffer32"ambient/animal/bird%d.wav"i);
            
PrecacheSound(sBufferfalse);
            
i++;
        }
    }
}

public 
Action:birdsong(Handle:timer)
{
    
decl i;
    
decl String:sBuffer[32];
    
decl Float:origin[3];
    
0;
    while (
15)
    {
        if (
GetRandomInt(1100) > 80)
        {
            
FormatEx(sBuffer32"ambient/animal/bird%d.wav"GetRandomInt(120));
            
GetEntPropVector(birdindex[i], PropType:0"m_vecOrigin"origin0);
            
EmitAmbientSound(sBufferoriginbirdindex[i], 7501.01000.0);
        }
        if (
GetRandomInt(1100) > 87)
        {
            
GetEntPropString(birdindex[i], PropType:1"m_ModelName"sBuffer320);
            new 
var2;
            if (
sBuffer[1] == 's')
            {
                new 
var1;
                if (
GetRandomInt(01) == 1)
                {
                    
var1 1988;
                }
                else
                {
                    
var1 1992;
                }
                
var2[0] = var1;
            }
            else
            {
                if (
GetRandomInt(01) == 1)
                {
                    
var2[0] = 2000;
                }
                
var2[0] = 2008;
            }
            
Format(sBuffer6"%s"var2);
            
SetVariantString(sBuffer);
            
AcceptEntityInput(birdindex[i], "SetAnimation", -1, -10);
        }
        
i++;
    }
    return 
Action:0;
}

public 
RoundStart(Handle:eventString:name[], bool:dontBroadcast)
{
    
decl i;
    
decl func_rot;
    
decl bird;
    
0;
    
decl String:sTargetName[32];
    
decl String:sSpeed[8];
    
decl String:sModel[32];
    new 
birdspeed;
    new 
Float:angels[3] = 0.0;
    new 
bool:reverse;
    while (
15)
    {
        
func_rot CreateEntityByName("func_rotating", -1);
        
DispatchKeyValueVector(func_rot"origin"func_rot_coords[i]);
        
birdspeed GetRandomInt(1418);
        
FormatEx(sSpeed6"%d"birdspeed);
        
FormatEx(sTargetName32"gull_%d"func_rot);
        
DispatchKeyValue(func_rot"targetname"sTargetName);
        
DispatchKeyValue(func_rot"spawnflags""64");
        
DispatchKeyValue(func_rot"maxspeed"sSpeed);
        
DispatchSpawn(func_rot);
        
reverse GetRandomInt(1100) > 85;
        if (
reverse)
        {
            new 
z;
            while (
3)
            {
                
angels[z] = birds_angels[i][z];
                
z++;
            }
            switch (
angels[1])
            {
                case 
0:
                {
                    
angels[1] = 180.0;
                }
                case 
1119092736:
                {
                    
angels[1] = 270.0;
                }
                case 
1132920832:
                {
                    
angels[1] = 90.0;
                }
                default:
                {
                }
            }
        }
        
bird CreateEntityByName("prop_dynamic_override", -1);
        
DispatchKeyValueVector(bird"origin"birds_coords[i]);
        new 
var1;
        if (
reverse)
        {
            
var1[0] = angels;
        }
        else
        {
            
var1[0] = birds_angels[i];
        }
        
DispatchKeyValueVector(bird"angles"var1);
        new 
var2;
        if (
GetRandomInt(1100) > 80)
        {
            
var2[0] = 1796;
        }
        else
        {
            
var2[0] = 1776;
        }
        
FormatEx(sModel32var2);
        
DispatchKeyValue(bird"model"sModel);
        new 
var4;
        if (
sModel[1] == 's')
        {
            new 
var3;
            if (
birdspeed 16)
            {
                
var3 2160;
            }
            else
            {
                
var3 2164;
            }
            
var4[0] = var3;
        }
        else
        {
            if (
birdspeed 16)
            {
                
var4[0] = 2172;
            }
            
var4[0] = 2180;
        }
        
FormatEx(sSpeed6"%s"var4);
        
DispatchKeyValue(bird"DefaultAnim"sSpeed);
        
DispatchSpawn(bird);
        
SetVariantString(sTargetName);
        
AcceptEntityInput(bird"SetParent", -1, -10);
        
AcceptEntityInput(func_rot"Start", -1, -10);
        if (
reverse)
        {
            
AcceptEntityInput(func_rot"Reverse", -1, -10);
        }
        
birdindex[i] = bird;
        
i++;
    }
    return 
0;
}

public 
OnMapEnd()
{
    if (
hooked)
    {
        
UnhookEvent("round_start"RoundStartEventHookMode:2);
        
hooked false;
    }
    return 
0;

plugin decompiled you have to do a new one something like that

http://www.youtube.com/watch?v=twWRsUrV7QI
Aya Supay is offline
Marttt
Senior Member
Join Date: Jan 2019
Old 10-16-2019 , 16:50   Re: compile problem
Reply With Quote #8

Aya, thanks for the video.

generals, code correction would look something like this, but it still doesn't make sense, because * if * is decompiled code, some information may have been lost during the reverse engineer.

Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma semicolon 1

new String:mSEAGULL[20] = "models/seagull.mdl";
new String:mPIGEON[20] = "models/pigeon.mdl";
new bool:hooked;
new birdindex[15];

public OnMapStart()
{
    decl String:sBuffer[32];
    GetCurrentMap(sBuffer, 32);
    if (!strcmp(sBuffer, "de_dust2", true))
    {
        hooked = true;
        HookEvent("round_start", RoundStart, EventHookMode:2);
        CreateTimer(15.0, birdsong, any:0, 3);
        PrecacheModel(mSEAGULL, false);
        PrecacheModel(mPIGEON, false);
        new i = 1;
        while (i < 21)
        {
            FormatEx(sBuffer, 32, "ambient/animal/bird%d.wav", i);
            PrecacheSound(sBuffer, false);
            i++;
        }
    }
}

public Action:birdsong(Handle:timer)
{
    decl i;
    decl String:sBuffer[32];
    decl Float:origin[3];
    i = 0;
    while (i < 15)
    {
        if (GetRandomInt(1, 100) > 80)
        {
            FormatEx(sBuffer, 32, "ambient/animal/bird%d.wav", GetRandomInt(1, 20));
            GetEntPropVector(birdindex[i], PropType:0, "m_vecOrigin", origin, 0);
            EmitAmbientSound(sBuffer, origin, birdindex[i], 75, 0, 1.0, 100, 0.0);
        }
        if (GetRandomInt(1, 100) > 87)
        {
            GetEntPropString(birdindex[i], PropType:1, "m_ModelName", sBuffer, 32, 0);
            int var1;
            if (sBuffer[1] == 's')
            {
                if (GetRandomInt(0, 1) == 1)
                {
                    var1 = 1988;
                }
                else
                {
                    var1 = 1992;
                }
            }
            else
            {
                // if (GetRandomInt(0, 1) == 1)
                // {
                //     var1 = 2000;
                // }
                var1 = 2008;
            }
            Format(sBuffer, 6, "%s", var1);
            SetVariantString(sBuffer);
            AcceptEntityInput(birdindex[i], "SetAnimation", -1, -1, 0);
        }
        i++;
    }
    return Action:0;
}

public RoundStart(Handle:event, String:name[], bool:dontBroadcast)
{
    decl i;
    decl func_rot;
    decl bird;
    i = 0;
    decl String:sTargetName[32];
    decl String:sSpeed[8];
    decl String:sModel[32];
    new birdspeed;
    new Float:angels[3] = 0.0;
    new Float:func_rot_coords[15][3];
    new Float:birds_angels[15][3];
    new Float:birds_coords[15][3];
    new bool:reverse;
    while (i < 15)
    {
        func_rot = CreateEntityByName("func_rotating", -1);
        DispatchKeyValueVector(func_rot, "origin", func_rot_coords[i]);
        birdspeed = GetRandomInt(14, 18);
        FormatEx(sSpeed, 6, "%d", birdspeed);
        FormatEx(sTargetName, 32, "gull_%d", func_rot);
        DispatchKeyValue(func_rot, "targetname", sTargetName);
        DispatchKeyValue(func_rot, "spawnflags", "64");
        DispatchKeyValue(func_rot, "maxspeed", sSpeed);
        DispatchSpawn(func_rot);
        reverse = GetRandomInt(1, 100) > 85;
        if (reverse)
        {
            new z;
            while (z < 3)
            {
                angels[z] = birds_angels[i][z];
                z++;
            }
            switch (angels[1])
            {
                case 0:
                {
                    angels[1] = 180.0;
                }
                case 1119092736:
                {
                    angels[1] = 270.0;
                }
                case 1132920832:
                {
                    angels[1] = 90.0;
                }
                default:
                {
                }
            }
        }
        bird = CreateEntityByName("prop_dynamic_override", -1);
        DispatchKeyValueVector(bird, "origin", birds_coords[i]);
        new Float:var1[3];
        if (reverse)
        {
            var1 = angels;
        }
        else
        {
            var1 = birds_angels[i];
        }
        DispatchKeyValueVector(bird, "angles", var1);
        new var2;
        if (GetRandomInt(1, 100) > 80)
        {
            var2 = 1796;
        }
        else
        {
            var2 = 1776;
        }
        //FormatEx(sModel, 32, var2);
        Format(sModel, 6, "%s", var2);
        DispatchKeyValue(bird, "model", sModel);
        new var3;
        if (sModel[1] == 's')
        {
            if (birdspeed > 16)
            {
                var3 = 2160;
            }
            else
            {
                var3 = 2164;
            }
        }
        else
        {
            // if (birdspeed > 16)
            // {
            //     var3 = 2172;
            // }
            var3 = 2180;
        }
        FormatEx(sSpeed, 6, "%s", var3);
        DispatchKeyValue(bird, "DefaultAnim", sSpeed);
        DispatchSpawn(bird);
        SetVariantString(sTargetName);
        AcceptEntityInput(bird, "SetParent", -1, -1, 0);
        AcceptEntityInput(func_rot, "Start", -1, -1, 0);
        if (reverse)
        {
            AcceptEntityInput(func_rot, "Reverse", -1, -1, 0);
        }
        birdindex[i] = bird;
        i++;
    }
    return 0;
}

public OnMapEnd()
{
    if (hooked)
    {
        UnhookEvent("round_start", RoundStart, EventHookMode:2);
        hooked = false;
    }
}
__________________

Last edited by Marttt; 10-16-2019 at 16:52.
Marttt is offline
generals
Senior Member
Join Date: Aug 2018
Old 10-18-2019 , 13:19   Re: compile problem
Reply With Quote #9

hi ..tnx brothers

yes. plugin has been decompiled

i have smx file..if someone can help i can send him
generals is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:34.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode