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

Give me something


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ItsExTacY
Member
Join Date: Jul 2017
Location: Israel
Old 07-22-2017 , 19:54   Give me something
Reply With Quote #1

Hello ! im starting learn sourcepawn and sourcecode yesterday
and i want you give me some plugin to create(easy)




And i need someone to explain me how i make player target

Thanks!
ItsExTacY is offline
zyox123cc
Senior Member
Join Date: Jul 2016
Location: spycrab
Old 07-22-2017 , 21:31   Re: Give me something
Reply With Quote #2

Code:
#include <sourcemod>
#include <sdktools>
 
public Plugin myinfo =
{
	name = "My First Plugin",
	author = "Me",
	description = "My first plugin ever",
	version = "1.0.0.0",
	url = "http://www.sourcemod.net/"
}
 
public void OnPluginStart()
{
	RegAdminCmd("sm_myslap", Command_MySlap, ADMFLAG_SLAY);
}
 
public Action Command_MySlap(int client, int args)
{
	char arg1[32], arg2[32];
	int damage;
 
	/* Get the first argument */
	GetCmdArg(1, arg1, sizeof(arg1));
 
	/* If there are 2 or more arguments, and the second argument fetch 
	 * is successful, convert it to an integer.
	 */
	if (args >= 2 && GetCmdArg(2, arg2, sizeof(arg2)))
	{
		damage = StringToInt(arg2);
	}
 
	/* Try and find a matching player */
	int target = FindTarget(client, arg1);
	if (target == -1)
	{
		/* FindTarget() automatically replies with the 
		 * failure reason.
		 */
		return Plugin_Handled;
	}
 
	SlapPlayer(target, damage);
 
	char name[MAX_NAME_LENGTH];
 
	GetClientName(target, name, sizeof(name));
	ReplyToCommand(client, "[SM] You slapped %s for %d damage!", name, damage);
 
	return Plugin_Handled;
}
https://wiki.alliedmods.net/Introduc...rcemod_plugins
There are explanations on the page
You can understand how to use it
__________________
sv_downloadurl Recommended FREE website
000webhost(File is too big (max. 32MB)! Upload will be skipped.)
rejetto
(Local_computer_host)
Getting material/model paths easy way (Windows)
steam profile
Youtube

Last edited by zyox123cc; 07-22-2017 at 21:32.
zyox123cc is offline
ItsExTacY
Member
Join Date: Jul 2017
Location: Israel
Old 07-23-2017 , 06:42   Re: Give me something
Reply With Quote #3

Quote:
Originally Posted by zyox123cc View Post
Code:
#include <sourcemod>
#include <sdktools>
 
public Plugin myinfo =
{
	name = "My First Plugin",
	author = "Me",
	description = "My first plugin ever",
	version = "1.0.0.0",
	url = "http://www.sourcemod.net/"
}
 
public void OnPluginStart()
{
	RegAdminCmd("sm_myslap", Command_MySlap, ADMFLAG_SLAY);
}
 
public Action Command_MySlap(int client, int args)
{
	char arg1[32], arg2[32];
	int damage;
 
	/* Get the first argument */
	GetCmdArg(1, arg1, sizeof(arg1));
 
	/* If there are 2 or more arguments, and the second argument fetch 
	 * is successful, convert it to an integer.
	 */
	if (args >= 2 && GetCmdArg(2, arg2, sizeof(arg2)))
	{
		damage = StringToInt(arg2);
	}
 
	/* Try and find a matching player */
	int target = FindTarget(client, arg1);
	if (target == -1)
	{
		/* FindTarget() automatically replies with the 
		 * failure reason.
		 */
		return Plugin_Handled;
	}
 
	SlapPlayer(target, damage);
 
	char name[MAX_NAME_LENGTH];
 
	GetClientName(target, name, sizeof(name));
	ReplyToCommand(client, "[SM] You slapped %s for %d damage!", name, damage);
 
	return Plugin_Handled;
}
https://wiki.alliedmods.net/Introduc...rcemod_plugins
There are explanations on the page
You can understand how to use it
I mean give me mission to create somthing easy and then ill post here and you willl tell me if its good
ItsExTacY is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 07-23-2017 , 12:53   Re: Give me something
Reply With Quote #4

Yes, sure.

Connect/Disconnect Messages
Killer Info
!ip - !ts3 Commands (I think, dont do this. Baby work )
A suicide command for players. (sm_suicide)
bla bla bla.... You can think a lot of idea.
__________________
vortex. is offline
ItsExTacY
Member
Join Date: Jul 2017
Location: Israel
Old 07-23-2017 , 13:21   Re: Give me something
Reply With Quote #5

Quote:
Originally Posted by vortex. View Post
Yes, sure.

Connect/Disconnect Messages
Killer Info
!ip - !ts3 Commands (I think, dont do this. Baby work )
A suicide command for players. (sm_suicide)
bla bla bla.... You can think a lot of idea.
connect/disconnect Messege
PHP Code:
#include <sourcemod>
#include <geoip>
#pragma tabsize 0

new Handle:h_connectmsg INVALID_HANDLE;
new 
Handle:h_disconnectmsg INVALID_HANDLE;

public 
Plugin:myinfo 
{
    
name "Connect MSG",
    
author "ExTacY",
    
description "Provides Info of the player when he joins",
    
version "1.0",
    
url ""
};

public 
OnPluginStart()
{    
    
h_connectmsg CreateConVar("sm_connectmsg""1""Shows a connect message in the chat once a player joins."FCVAR_NOTIFY FCVAR_DONTRECORD);
    
h_disconnectmsg CreateConVar("sm_disconnectmsg""1""Shows a disconnect message in the chat once a player leaves."FCVAR_NOTIFY FCVAR_DONTRECORD);
}

public 
OnClientPutInServer(client)
{
    new 
Connect GetConVarInt(h_connectmsg);
    if(
Connect == 1)
    {
        new 
String:name[99], String:authid[99], String:IP[99], String:Country[99];
        
        
GetClientName(clientnamesizeof(name));
        
        
GetClientAuthId(clientAuthId_Steam2authidsizeof(authid));
        
        
GetClientIP(clientIPsizeof(IP), true);
        
    if(!
GeoipCountry(IPCountrysizeof Country))
    {
        
Country "Unknown Country";
    }  
        
PrintToChatAll(" \x04[CONNECT]\x03 %s (%s) has joined the server from [%s]"nameauthidCountry);
        
    } else {
  
    
CloseHandle(h_connectmsg);
   }
}

public 
OnClientDisconnect(client)
{
    new 
Disconnect GetConVarInt(h_disconnectmsg);
    if(
Disconnect == 1)
    
    {
        new 
String:name[99], String:authid[99], String:IP[99], String:Country[99];
        
        
GetClientName(clientnamesizeof(name));
        
        
GetClientAuthId(clientAuthId_Steam2authidsizeof(authid));
        
        
GetClientIP(clientIPsizeof(IP), true);
        
    if(!
GeoipCountry(IPCountrysizeof Country))
    
    {
        
Country "Unknown Country";
    }
    
        
PrintToChatAll(" \x04[DISCONNECT]\x03 %s (%s) has left the server from [%s]"nameauthidCountry);
        
    } else {
    
    
CloseHandle(h_disconnectmsg);
}


What do you mean killer info and sucide command?

Last edited by ItsExTacY; 07-23-2017 at 13:21.
ItsExTacY is offline
AmazingDay
Junior Member
Join Date: Jun 2017
Location: Book
Old 07-23-2017 , 18:01   Re: Give me something
Reply With Quote #6

type in chat !suicide and it will force player to suicide, killer show infos about the killer how he killed the player - whit what weapon +++....
AmazingDay is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 07-23-2017 , 18:12   Re: Give me something
Reply With Quote #7

Quote:
Originally Posted by ItsExTacY View Post
connect/disconnect Messege
PHP Code:
#include <sourcemod>
#include <geoip>
#pragma tabsize 0

new Handle:h_connectmsg INVALID_HANDLE;
new 
Handle:h_disconnectmsg INVALID_HANDLE;

public 
Plugin:myinfo 
{
    
name "Connect MSG",
    
author "ExTacY",
    
description "Provides Info of the player when he joins",
    
version "1.0",
    
url ""
};

public 
OnPluginStart()
{    
    
h_connectmsg CreateConVar("sm_connectmsg""1""Shows a connect message in the chat once a player joins."FCVAR_NOTIFY FCVAR_DONTRECORD);
    
h_disconnectmsg CreateConVar("sm_disconnectmsg""1""Shows a disconnect message in the chat once a player leaves."FCVAR_NOTIFY FCVAR_DONTRECORD);
}

public 
OnClientPutInServer(client)
{
    new 
Connect GetConVarInt(h_connectmsg);
    if(
Connect == 1)
    {
        new 
String:name[99], String:authid[99], String:IP[99], String:Country[99];
        
        
GetClientName(clientnamesizeof(name));
        
        
GetClientAuthId(clientAuthId_Steam2authidsizeof(authid));
        
        
GetClientIP(clientIPsizeof(IP), true);
        
    if(!
GeoipCountry(IPCountrysizeof Country))
    {
        
Country "Unknown Country";
    }  
        
PrintToChatAll(" \x04[CONNECT]\x03 %s (%s) has joined the server from [%s]"nameauthidCountry);
        
    } else {
  
    
CloseHandle(h_connectmsg);
   }
}

public 
OnClientDisconnect(client)
{
    new 
Disconnect GetConVarInt(h_disconnectmsg);
    if(
Disconnect == 1)
    
    {
        new 
String:name[99], String:authid[99], String:IP[99], String:Country[99];
        
        
GetClientName(clientnamesizeof(name));
        
        
GetClientAuthId(clientAuthId_Steam2authidsizeof(authid));
        
        
GetClientIP(clientIPsizeof(IP), true);
        
    if(!
GeoipCountry(IPCountrysizeof Country))
    
    {
        
Country "Unknown Country";
    }
    
        
PrintToChatAll(" \x04[DISCONNECT]\x03 %s (%s) has left the server from [%s]"nameauthidCountry);
        
    } else {
    
    
CloseHandle(h_disconnectmsg);
}


What do you mean killer info and sucide command?
Really? Are u serious? Please don't do this. You think we're stupid? This is not your plugin. If you continue this way, you will not learn SourceMod.

All you know is to change the author part.
https://forums.alliedmods.net/showthread.php?p=2317313
__________________

Last edited by vortex.; 07-23-2017 at 18:14.
vortex. is offline
ItsExTacY
Member
Join Date: Jul 2017
Location: Israel
Old 07-23-2017 , 19:41   Re: Give me something
Reply With Quote #8

Quote:
Originally Posted by vortex. View Post
Really? Are u serious? Please don't do this. You think we're stupid? This is not your plugin. If you continue this way, you will not learn SourceMod.

All you know is to change the author part.
https://forums.alliedmods.net/showthread.php?p=2317313
ok its true sorry.

But now i swear i create own at myself
PHP code:
PHP Code:
#include <sourcemod>
#include <geoip>

public Plugin myinfo 
{
    
name "ConnectMSG"
    
author "ExTacY"
    
description ""
    
version "1.0"
    
url ""
};

public 
OnClientPutInServer(client)
{
    new 
String:name[99], String:IP[99], String:Country[99], String:authid[99];
    
    
GetClientName(clientnamesizeof(name));
    
    
GetClientAuthId(clientAuthId_Steam2authidsizeof(authid));
    
    
GetClientIP(clientIPsizeof(IP), true);
    
    if (!
GeoipCountry(IPCountrysizeof Country))
    {
        
Country "Unknown Country";
    }
    
PrintToChatAll(" \x04[CONNECT]\x03 %s (%s) has joined the server from [%s]"nameauthidCountry);
}

public 
OnClientDisconnect(client)
{
    new 
String:name[99], String:authid[99], String:IP[99], String:Country[99];
    
    
GetClientName(clientnamesizeof(name));
    
    
GetClientAuthId(clientAuthId_Steam2authidsizeof(authid));
    
    
GetClientIP(clientIPsizeof(IP), true);
    
    if (!
GeoipCountry(IPCountrysizeof Country))
        
    {
        
Country "Unknown Country";
    }
    
    
PrintToChatAll(" \x04[DISCONNECT]\x03 %s (%s) has left the server from [%s]"nameauthidCountry);

ItsExTacY is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 07-23-2017 , 21:25   Re: Give me something
Reply With Quote #9

Dude look, if you want learn Sourcemod;
- You can see other plugins scripts.
- You can take other plugins a part.
- You have to try.
- You should not change the author part if you dont have permission or anyway.
- Always, you can open thread on forum when you need help.
- Read tutorials.
- Trust yourself you can do it

Good luck!
__________________

Last edited by vortex.; 07-23-2017 at 21:25.
vortex. is offline
ItsExTacY
Member
Join Date: Jul 2017
Location: Israel
Old 07-24-2017 , 06:21   Re: Give me something
Reply With Quote #10

Quote:
Originally Posted by vortex. View Post
Dude look, if you want learn Sourcemod;
- You can see other plugins scripts.
- You can take other plugins a part.
- You have to try.
- You should not change the author part if you dont have permission or anyway.
- Always, you can open thread on forum when you need help.
- Read tutorials.
- Trust yourself you can do it

Good luck!
Do you have skype i need ask you something
ItsExTacY 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 09:25.


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