Raised This Month: $7 Target: $400
 1% 

Global Offensive Mod v1.1p


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
DeRoiD
Senior Member
Join Date: Feb 2015
Old 07-02-2015 , 12:33   Global Offensive Mod v1.1p
Reply With Quote #1

NEW VERSION! CLICK HERE

.
.
.
.
.


Global Offensive Mod
1.1 Public Version


Description

If you kill enemy chances are that found Chest or Key! Only weapons may find in the Ch
est. Get more skins!


Settings


Drops
Quote:
#define PointsMin 3 //Minimum points in kill
#define PointsMax 8 //Maximum points in kill
#define Drop 10 //Chance to find chest or key
#define MarkMin 25 //Minimum cost in market

New weapon [max 50]
write last line
"weapon ID" "name" "v mdl" "chance to find (1-100)"
Rang
"Rang Name" "Needed kill"


Parts of Plugin
  • Register System
  • Rang System
  • Market
  • Gift System
  • Dustbin
  • Chest open
  • Weapon menu


Lang
  • Hungary - DeRoiD
  • English - DeRoiD


Commands
  • /gun - Weapon Menu
  • /menu - Main Menu
  • /reg - Reg Menu

Install
  1. Download plugin files
  2. reg.ini, save.ini, rangs.ini, skins.ini, dskins.ini files to configs/csgo folder
  3. The weapon models to models/yourfolder folder


Screenshots










Changelog
  • 1.0p
    • First release
  • 1.1p
    • Fix errors
The file is too large...
Link: https://drive.google.com/file/d/0B64vWj0cMno8V2RqLUpkSktBNm8/view
Attached Files
File Type: sma Get Plugin or Get Source (csgo11.sma - 13063 views - 28.8 KB)
__________________

Last edited by DeRoiD; 03-11-2017 at 14:51.
DeRoiD is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 07-02-2015 , 13:53   Re: Global Offensive Mod v1.0p
Reply With Quote #2

- You start the message in the first 67.3 then play it again in each 76.9s why? just add a loop 'b' and why those different num??
+
Code:
    if(is_user_alive(id))     {         Choosen[id] = 0;         if(user_has_weapon(id, CSW_C4))         {             strip_user_weapons(id);             give_item(id, "weapon_c4");             give_item(id, "weapon_knife");             WeaponMenu(id);         }         else         {             strip_user_weapons(id);             if(cs_get_user_team(id) == CS_TEAM_CT)                 cs_set_user_defuse(id, 1);             give_item(id, "weapon_knife");             WeaponMenu(id);         }     }
use WeaponMenu(id) once.

+I don't know why you don't use charsmax()!!! Man use it please.
- You can increase the ( new data in the menu ) to -> [6].
+ use static instead of -> new in -> new OldName[32], NewName[32], Name[32] ...
+ if(containi(Mdl, ".mdl") != -1) can be like this also -> if(equal(Mdl[strlen(Mdl)-4] , ".mdl"))
well its the same.

+ Add a 'else' while opening the file with message if the file doesn't exist
+ Use 'case' instead of statement ( if ) in 'Key' in the menu.
- If you want to clear a variable like the Password[id] = "" , i think its better to use EOS
+ if(Line[0] == ';' || strlen(Line) < 2) u can add this it won't hurt (Just in case) "|| (Line[0] == '/' && Line[1] == '/')"
+ Use DeathMsg instead of client_death ( client_death its can be efficient for getting the wpnindex and hitplace and TK
+ Add a check in Death(event) -> if ( is_user_connected(killer) )
+ i've heard that client_death don't return anything like PLUGIN_HANDLED/CONTINUE .. , just do a 'return' in case if you keep client_death but DeathMsg event better.

EDIT:

-
Code:
    switch(cs_get_user_team(id))         {         case 1: ColorChat(0, RED, cChat);         case 2: ColorChat(0, BLUE, cChat);         case 3: ColorChat(0, GREY, cChat);     }

Why didn't you just use TEAM_COLOR?

EDIT2 :

Code:
stock bool:ValidMdl(Mdl[]) {     if(containi(Mdl, ".mdl") != -1)     {         return true;     }     return false; }

Can just be like this :

Code:
stock bool:ValidMdl(Mdl[])     return ( containi(Mdl,".mdl") != -1 )

i think this is all what i've seen. if anything you see it wrong, just say it.

Last edited by Freezo Begin; 07-03-2015 at 10:37.
Freezo Begin is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-02-2015 , 14:03   Re: Global Offensive Mod v1.0p
Reply With Quote #3

I see some wrong things.
Quote:
+ use static instead of -> new in -> new OldName[32], NewName[32], Name[32] ...
No.

Quote:
+ if(containi(Mdl, ".mdl") != -1) can be like this also -> if(equal(Mdl[strlen(Mdl)] , ".mdl"))
It's fine as it is, also, how is your example supposed to work ? It's nonsense.

Quote:
- If you want to clear a variable like the Password[id] = "" , i think its better to use '\0'
Escape char in amxx is ^, not \ by default AFAIK(unless you don't change ctrlchar directive). Also, you should put EOS for readability purpose.

Quote:
+ Use DeathMsg instead of client_death ( client_death its can be efficient for getting the wpnindex and hitplace and TK
Why ?

Please, learn more before correcting others.

@DeRoiD, you should learn more(basic optimizations and good practices at least) before releasing a plugin. You have some nice ideeas, but if you can't code them in a proper way it's useless.
__________________

Last edited by HamletEagle; 07-02-2015 at 14:05.
HamletEagle is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 07-02-2015 , 14:34   Re: Global Offensive Mod v1.0p
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
I see some wrong things. No.
Well its not wrong static is much faster. and its a bad habit for using new in change name.

Quote:
Originally Posted by HamletEagle View Post
It's fine as it is, also, how is your example supposed to work ? It's nonsense.
I said that its the same. i didn't said that he should replace it.

Quote:
Originally Posted by HamletEagle View Post
Escape char in amxx is ^, not \ by default AFAIK(unless you don't change ctrlchar directive). Also, you should put EOS for readability purpose.
EOS and '^0' are the same. i've put EOS( '^0' ) then i edited my post.
EOS = '^0' = 0

Quote:
Originally Posted by HamletEagle View Post
Why ?
I said why! just because he don't need it. he just need DeathMsg.

Quote:
Originally Posted by HamletEagle View Post
Please, learn more before correcting others.

You didn't give me arguments. why i'm wrong :/!

Last edited by Freezo Begin; 07-02-2015 at 14:46.
Freezo Begin is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-02-2015 , 15:28   Re: Global Offensive Mod v1.0p
Reply With Quote #5

Quote:
Originally Posted by Freezo Begin View Post
Well its not wrong static is much faster. and its a bad habit for using new in change name.



I said that its the same. i didn't said that he should replace it.



EOS and '^0' are the same. i've put EOS( '^0' ) then i edited my post.
EOS = '^0' = 0


I said why! just because he don't need it. he just need DeathMsg.




You didn't give me arguments. why i'm wrong :/!
Lol, even where I explained you still dind't understood.

1.Why the ... is a good habit to use static when changing names ? static should be used on forwards that are called often to allocate memory one time, how many times a user can change his name per second ? Try to use some logic.

2.Your example is wrong, this is what I said. Do you even test before posting ?

3.You wrote "'\0'", I just said that if I remeber well the control char is ^ and not \, also gave an advice to use the constant EOS for readability.

4.client_death does the same thing as DeadMsh, no matter the method in such case. What are you talking about ? Again, try to make some sense.
__________________

Last edited by HamletEagle; 07-02-2015 at 15:29.
HamletEagle is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 07-02-2015 , 15:47   Re: Global Offensive Mod v1.0p
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
Lol, even where I explained you still dind't understood.

1.Why the ... is a good habit to use static when changing names ? static should be used on forwards that are called often to allocate memory one time, how many times a user can change his name per second ? Try to use some logic.

2.Your example is wrong, this is what I said. Do you even test before posting ?

3.You wrote "'\0'", I just said that if I remeber well the control char is ^ and not \, also gave an advice to use the constant EOS for readability.

4.client_death does the same thing as DeadMsg, no matter the method in such case. What are you talking about ? Again, try to make some sense.
1- Alright now it make since (i also see a lot of good scripters like Connor do static in change name).
2- if(equal(Mdl[strlen(Mdl)] , ".mdl")) . Lol, i forgot -4 -> if(equal(Mdl[strlen(Mdl)-4] , ".mdl")). And yes i've test it but i copy the wrong script.
3- No comment

4- Read my first reply(#2)

Last edited by Freezo Begin; 07-02-2015 at 15:50.
Freezo Begin is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-02-2015 , 16:14   Re: Global Offensive Mod v1.0p
Reply With Quote #7

Quote:
Originally Posted by Freezo Begin View Post
Well its not wrong static is much faster.
Saying it that way is really bad as someone new to Pawn would understand your sentence as "always use static instead of new, because it's much faster". It's not "much" faster, and it's really trivial with arrays made of so few elements.
In a forward (ChangeName in this case) that's called not-so-often it really depends on the coder. Some might want to sacrifice some memory(with static), and some might want to sacrifice like a microsecond of execution time (with new). Both are correct choices in this case, no reason to fight over that.
klippy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-02-2015 , 16:30   Re: Global Offensive Mod v1.0p
Reply With Quote #8

It's still useless imo, over-optimizing is never a good choice. My point was that new is perfectly fine in this case and changing to static is not needed.
client_death is not a wrong choice, I don't see you giving a good reason. But, let's come back to the topic.
__________________

Last edited by HamletEagle; 07-03-2015 at 06:12.
HamletEagle is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 07-03-2015 , 01:39   Re: Global Offensive Mod v1.0p
Reply With Quote #9

Good idea, poorly done.
__________________
Kia is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 07-03-2015 , 02:19   Re: Global Offensive Mod v1.0p
Reply With Quote #10

I like this idea ;)
tousif 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 00:07.


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