Raised This Month: $12 Target: $400
 3% 

Showing results 1 to 25 of 162
Search took 0.01 seconds.
Search: Posts Made By: pride95
Forum: Scripting 06-11-2018, 18:38
Replies: 6
Views: 1,663
Posted By pride95
Re: Ways to start learn sourcepawn? [cs:go] [sourcepawn]

You have all functions in wiki page.
OnPluginStart(), OnMapStart() and HookEvent() are some basic functions used in almost every plugin.

If you need database, you have Database class called as...
Forum: Scripting 06-08-2018, 14:45
Replies: 12
Views: 2,519
Posted By pride95
Re: Detecting Netprops/Datamaps Change?

this must be used into an extension. try it, we don't know if it's working, normally it should.
Forum: Scripting 06-08-2018, 14:43
Replies: 8
Views: 1,720
Posted By pride95
Re: Simple task dose not work. argument type mismatch(argument 1)

int Client, Money;
char[100] String;

PrintToChatAll("%d %d %s", Client, Money, String);



3 parameters, 3 formats (%d, %d, %s)

%d or %i for int
Forum: Scripting 06-03-2018, 08:32
Replies: 5
Views: 1,438
Posted By pride95
Re: [CS:S] server_shutdown HookEvent

try server_pre_shutdown
Forum: Scripting 05-05-2018, 13:26
Replies: 6
Views: 1,536
Posted By pride95
Re: [CSGO] Working with spectators?

m_hObserverTarget

use a timer and try to send another target if observertarget == x?
Forum: Scripting 05-03-2018, 09:07
Replies: 1
Views: 722
Posted By pride95
[CSGO] Armor and movement SDKHook_OnTakeDamage

public Action Hook_OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3])
{
if(something)
{
return...
Forum: Scripting 05-01-2018, 06:43
Replies: 1
Views: 953
Posted By pride95
[CS:GO] Spawn ball like in dust2

What entity should i create to spawn a ball like in the map de_dust2? That entity should be collide with players even if i set m_CollisionGroup 2 for them.

prop_physics?
Forum: Scripting 04-28-2018, 12:15
Replies: 10
Solved 26 errors
Views: 1,647
Posted By pride95
Re: 26 errors

if your code is private, we cannot help you
read the forum rules before you make a thread.
Forum: Scripting 04-24-2018, 15:15
Replies: 4
Views: 976
Posted By pride95
Re: Alignment by columns

You can align if your first column has numbers:



char Buffer[];
Format(Buffer, sizeof(Buffer), "%09d %s", int, char);



you have an int with size 9. before numbers you have zeros.
Forum: Scripting 04-22-2018, 06:09
Replies: 4
Views: 1,799
Posted By pride95
Re: Client not connected Prevention.

RegConsoleCmd("sm_spec", Client_Spec);

public Action Client_Spec(int Client, int Args)
{
if(Client != 0) // Client 0 means the server itself.
{
SpecPlayer(Client, Args);
}

return...
Forum: Scripting 04-21-2018, 14:42
Replies: 7
Views: 3,252
Posted By pride95
Re: How to block map weapons like surf_ski_2_go

surf_ski_2_go
GO


if you want to block some weapons on surf_ski_2_go, you should search for game_player_equip entity and check if that entity spawns your desired weapon to block.
Forum: Scripting 04-05-2018, 18:12
Replies: 5
Views: 1,390
Posted By pride95
Re: Autojoin blocks the buy menu

Have you tested? Players can't buy weapons because you assign them a team before the hud with menu selection appears. So the cvar with time on 0 disables the menu on connect, but it works fine while...
Forum: Scripting 04-05-2018, 13:13
Replies: 5
Views: 1,390
Posted By pride95
Re: Autojoin blocks the buy menu

mp_force_assign_teams 0
mp_force_pick_time 0
Forum: Scripting 04-04-2018, 15:14
Replies: 22
Views: 6,005
Posted By pride95
Forum: Scripting 04-04-2018, 12:10
Replies: 18
Views: 4,238
Posted By pride95
Re: [CS:GO] Remove X key from KeyValue after X time(2 weeks, 1 month)

yes, you can. use database, not keyvalues for what you are trying.

create a database with steamid primary key and data (type data).
insert in the database the steamid and data


insert in...
Forum: Scripting 04-04-2018, 12:03
Replies: 22
Views: 6,005
Posted By pride95
Re: [L4D2] How to hook player connect without players from last chapter

let's clarify.

if i'm the first player connected on the server (in the morning with 0 players online) let's say i have userid 100
if i reconnect on the server i will have userid: 101
if the map...
Forum: Scripting 04-04-2018, 06:43
Replies: 22
Views: 6,005
Posted By pride95
Re: [L4D2] How to hook player connect without players from last chapter

int IntMaxUserId;

public void OnPluginStart()
{
HookEvent("player_connect_full", Event_PlayerConnect);
}

public void OnMapStart()
{
int Bot = CreateFakeClient("Bot");
Forum: Scripting 04-03-2018, 15:00
Replies: 22
Views: 6,005
Posted By pride95
Re: [L4D2] How to hook player connect without players from last chapter

userid.

if a client connects from lobby then userid++;
if a client connects from map change the old userid (from the previous map) == userid (from this map).

try to create a fakeclient...
Forum: Scripting 03-27-2018, 15:37
Replies: 0
Views: 580
Posted By pride95
Query not fetching

public Action Event_PlayerConnect(Event event, const char[] name, bool dontBroadcast)
{
int Id = event.GetInt("userid");
int Client = GetClientOfUserId(Id);

if(Client != 0)
{
IntRank[Client]...
Forum: Scripting 03-21-2018, 10:59
Replies: 5
Views: 2,538
Posted By pride95
Re: [CS:GO] Check if there's admin in the server

why count? use a bool for what you need and a break after you found an admin.
isclientingame and ( && ) checkcommandacces, not or ( || )


bool admin = false;

for (int client = 1; client <=...
Forum: Scripting 03-12-2018, 07:22
Replies: 6
Views: 1,106
Posted By pride95
Re: Best way to store "points" on each client.

new points[MAXPLAYERS + 1];

for (int i = 1; i <= MaxClients; i++)



Basic sourcemod.
Forum: Scripting 03-11-2018, 07:55
Replies: 18
Views: 3,306
Posted By pride95
Re: DataPacks and queries leaking?

You should check just

DBResultSet results

if(results != null) {}
Forum: Scripting 03-10-2018, 11:20
Replies: 18
Views: 3,306
Posted By pride95
Re: DataPacks and queries leaking?

DataPack pk = new DataPack();

if(iClient) pk.WriteCell(GetClientSerial(iClient));
else pk.WriteCell(0);

char cQuery[256];
FormatEx(cQuery, sizeof(cQuery), "SELECT NULL FROM `bans_table`...
Forum: Scripting 03-10-2018, 07:53
Replies: 7
Views: 1,971
Posted By pride95
Re: Formula to get a players scoreboard ping.

stock int GetLatency(int Client)
{
float Ping = 1000.0 * GetClientLatency(Client, NetFlow_Both);
return RoundToNearest(Ping);
}
Forum: Scripting 03-10-2018, 06:09
Replies: 5
Views: 1,137
Posted By pride95
Re: Get random spawn for team

stock int EntityTerroristSpawn()
{
int Spawn = -1;
ArrayList ArrayListSpawns = new ArrayList();

while((Spawn = FindEntityByClassname(Spawn, "info_player_terrorist")) != -1)
{...
Showing results 1 to 25 of 162

 
Forum Jump

All times are GMT -4. The time now is 17:11.


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