Raised This Month: $32 Target: $400
 8% 

Recommendations where to start learning SP??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doggg
Member
Join Date: Jun 2018
Old 07-07-2019 , 16:06   Recommendations where to start learning SP??
Reply With Quote #1

Hey, I know C and Java programming languages and I would like to start learning Sourcepawn.
I'm willing to pay money for some good guides or even a teacher (If one of you guys want to help me out please comment).
Any ideas? It seems confusing to start learning this from youtube (i cannot find a good guide for this).
Doggg is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-07-2019 , 16:15   Re: Recommendations where to start learning SP??
Reply With Quote #2

https://wiki.alliedmods.net/Introduction_to_SourcePawn
https://wiki.alliedmods.net/Introduc...rceMod_Plugins
__________________
8guawong is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 07-07-2019 , 16:21   Re: Recommendations where to start learning SP??
Reply With Quote #3

Quote:
Originally Posted by Doggg View Post
Hey, I know C and Java programming languages and I would like to start learning Sourcepawn.
I'm willing to pay money for some good guides or even a teacher (If one of you guys want to help me out please comment).
Any ideas? It seems confusing to start learning this from youtube (i cannot find a good guide for this).
You can learn fast , because you know some other languages ,I suggest you to to first read pawn picture tutorial :

https://forums.alliedmods.net/showthread.php?t=94381
LearninG is offline
Doggg
Member
Join Date: Jun 2018
Old 07-07-2019 , 16:27   Re: Recommendations where to start learning SP??
Reply With Quote #4

Quote:
Originally Posted by LearninG View Post
You can learn fast , because you know some other languages ,I suggest you to to first read pawn picture tutorial :

https://forums.alliedmods.net/showthread.php?t=94381
Thank you! I will check this out.
Just wrote out this code, will this work? compiler show no warnings, I just want this command to make some server commands.



#define DEBUG

#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "0.00"

#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>



public Plugin myinfo =
{
name = "",
author = PLUGIN_AUTHOR,
description = "",
version = PLUGIN_VERSION,
url = ""
};

public void OnPluginStart()
{
RegConsoleCmd("sm_abc",abc);
}

public Action:abc(server,args)
{
ServerCommand("mp_teamlimits 0");
}
Doggg is offline
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 07-07-2019 , 16:50   Re: Recommendations where to start learning SP??
Reply With Quote #5

Quote:
Originally Posted by Doggg View Post
will this work?
yes but use the damn new syntax
__________________
kratoss1812 is offline
Doggg
Member
Join Date: Jun 2018
Old 07-07-2019 , 17:08   Re: Recommendations where to start learning SP??
Reply With Quote #6

Quote:
Originally Posted by kratoss1812 View Post
yes but use the damn new syntax
lol dude i have no idea in this language, just learned this an hour or so ago (the VERY BASICS).
what the new syntax is?
Doggg is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 07-07-2019 , 17:09   Re: Recommendations where to start learning SP??
Reply With Quote #7

also dont use unnecessary includes.
and on the RegConsoleCmd callback function parameter is client. just notice.

Quote:
Originally Posted by Doggg View Post
lol dude i have no idea in this language, just learned this an hour or so ago (the VERY BASICS).
what the new syntax is?
https://wiki.alliedmods.net/SourcePa...itional_Syntax

Last edited by farawayf; 07-07-2019 at 17:10.
farawayf is offline
Doggg
Member
Join Date: Jun 2018
Old 07-07-2019 , 17:49   Re: Recommendations where to start learning SP??
Reply With Quote #8

Quote:
Originally Posted by farawayf View Post
also dont use unnecessary includes.
and on the RegConsoleCmd callback function parameter is client. just notice.



https://wiki.alliedmods.net/SourcePa...itional_Syntax
Thanks, I will check this out.
Can you please fix my code? i mean with the new syntax and remove the unnecessary includes and the client parameter? i am sorry if this is rude for me to ask. just trying to learn from the pros.
Doggg is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 07-07-2019 , 18:12   Re: Recommendations where to start learning SP??
Reply With Quote #9

PHP Code:

#include <sourcemod>

#define DEBUG

#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "0.00"

#pragma newdecls required


public Plugin myinfo 
{
    
name "",
    
author PLUGIN_AUTHOR,
    
description "",
    
version PLUGIN_VERSION,
    
url ""
}

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_abc"abc);
}

public 
Action abc(int clientint args//first parameter is client index, who activated the command. 
{
    
ServerCommand("mp_teamlimits 0");

    
//PrintToChat(client, "debug"); - printing the debug message to client index
    
return Plugin_Handled//tell to sourcemod the function is done. Also removing Unknown command warning in game console.


Last edited by farawayf; 07-07-2019 at 18:13.
farawayf is offline
Doggg
Member
Join Date: Jun 2018
Old 07-07-2019 , 18:29   Re: Recommendations where to start learning SP??
Reply With Quote #10

Quote:
Originally Posted by farawayf View Post
PHP Code:

#include <sourcemod>

#define DEBUG

#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "0.00"

#pragma newdecls required


public Plugin myinfo 
{
    
name "",
    
author PLUGIN_AUTHOR,
    
description "",
    
version PLUGIN_VERSION,
    
url ""
}

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_abc"abc);
}

public 
Action abc(int clientint args//first parameter is client index, who activated the command. 
{
    
ServerCommand("mp_teamlimits 0");

    
//PrintToChat(client, "debug"); - printing the debug message to client index
    
return Plugin_Handled//tell to sourcemod the function is done. Also removing Unknown command warning in game console.

Thank you very much!
i have a few questions, Sorry again for bothering you.
first, cilent will always will be an integer parameter? same with args.
the debug message is just printing for the client "debug" to chat right?
the return plugin_handled is like a must return? i mean at the end of every plugin you must put it?
Doggg 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 08:43.


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