AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Global Offensive Mod v1.1p (https://forums.alliedmods.net/showthread.php?t=265653)

DeRoiD 07-02-2015 12:33

Global Offensive Mod v1.1p
 
1 Attachment(s)
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
http://kepfeltoltes.hu/150702/419504...toltes.hu_.jpg
http://kepfeltoltes.hu/150702/104331...toltes.hu_.jpg
http://kepfeltoltes.hu/150702/197281...toltes.hu_.jpg
http://kepfeltoltes.hu/150702/422041...toltes.hu_.jpg
http://kepfeltoltes.hu/150702/205746...toltes.hu_.jpg
http://kepfeltoltes.hu/150702/915642...toltes.hu_.jpg
http://kepfeltoltes.hu/150702/384215...toltes.hu_.jpg
http://kepfeltoltes.hu/150702/892355...toltes.hu_.jpg


Changelog
  • 1.0p
    • First release
  • 1.1p
    • Fix errors
The file is too large...
Link: https://drive.google.com/file/d/0B64vWj0cMno8V2RqLUpkSktBNm8/view

Freezo Begin 07-02-2015 13:53

Re: Global Offensive Mod v1.0p
 
- 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.

HamletEagle 07-02-2015 14:03

Re: Global Offensive Mod v1.0p
 
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.

Freezo Begin 07-02-2015 14:34

Re: Global Offensive Mod v1.0p
 
Quote:

Originally Posted by HamletEagle (Post 2314645)
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 (Post 2314645)
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 (Post 2314645)
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 (Post 2314645)
Why ?

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

Quote:

Originally Posted by HamletEagle (Post 2314645)
Please, learn more before correcting others.


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

HamletEagle 07-02-2015 15:28

Re: Global Offensive Mod v1.0p
 
Quote:

Originally Posted by Freezo Begin (Post 2314653)
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.

Freezo Begin 07-02-2015 15:47

Re: Global Offensive Mod v1.0p
 
Quote:

Originally Posted by HamletEagle (Post 2314669)
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)

klippy 07-02-2015 16:14

Re: Global Offensive Mod v1.0p
 
Quote:

Originally Posted by Freezo Begin (Post 2314653)
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.

HamletEagle 07-02-2015 16:30

Re: Global Offensive Mod v1.0p
 
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.

Kia 07-03-2015 01:39

Re: Global Offensive Mod v1.0p
 
Good idea, poorly done.

tousif 07-03-2015 02:19

Re: Global Offensive Mod v1.0p
 
I like this idea ;)


All times are GMT -4. The time now is 20:01.

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