Raised This Month: $ Target: $400
 0% 

Showing results 1 to 25 of 63
Search took 0.01 seconds.
Search: Posts Made By: mikehawk1339
Forum: Scripting 06-11-2013, 17:03
Replies: 31
Views: 12,957
Posted By mikehawk1339
Re: Set/Get values from a multidimensional Array

I never really thought of keyvalues. At least with that I know a lot of plugins use that so there should be plenty of examples. As for performance, I don't the specifics of the performance of the two...
Forum: Scripting 06-10-2013, 22:51
Replies: 31
Views: 12,957
Posted By mikehawk1339
Re: Set/Get values from a multidimensional Array

I do understand where you are coming from. But the reason I presented the examples like I did is because I want to eventually do more than just simply pull a class/model.

For example, in the...
Forum: Scripting 06-10-2013, 19:03
Replies: 31
Views: 12,957
Posted By mikehawk1339
Forum: Scripting 06-10-2013, 17:50
Replies: 31
Views: 12,957
Posted By mikehawk1339
Re: Set/Get values from a multidimensional Array

Thanks for the replies.

I'll take a look at the SMGen page. Looks pretty cool.

Yeah sorry if the array looks real complicated. It's really confusing to me too once you go past a 1D array.
...
Forum: Scripting 06-09-2013, 20:48
Replies: 31
Views: 12,957
Posted By mikehawk1339
Re: Set/Get values from a multidimensional Array

Yes, I agree that in my case I would mix strings with "integers/floats" and input them all as strings. That way I can convert those strings to ints/floats later on.

But the main question for me is...
Forum: Scripting 06-09-2013, 20:11
Replies: 31
Views: 12,957
Posted By mikehawk1339
Re: Set/Get values from a multidimensional Array

Well I understand what the cell structure looks like, in your example.

The problem is that I want to first determine which array their model is in, then decide which model. That's why I thought I...
Forum: Scripting 06-09-2013, 19:10
Replies: 31
Views: 12,957
Posted By mikehawk1339
Set/Get values from a multidimensional Array

I'm trying to understand how arrays work and I need help with setting and retrieving info from a multidimensional array.

I want to store a player's userid and assign 2 properties to it so I can...
Forum: Scripting 09-16-2012, 18:07
Replies: 20
Views: 9,656
Posted By mikehawk1339
Re: [CSS] One hit kill with knife

Alright, I'll try that.
Forum: Scripting 09-16-2012, 16:46
Replies: 20
Views: 9,656
Posted By mikehawk1339
Re: [CSS] One hit kill with knife

Pardon for me sound dumb, but are you referring to this post?
Forum: Scripting 09-15-2012, 22:56
Replies: 20
Views: 9,656
Posted By mikehawk1339
Re: [CSS] One hit kill with knife

That is currently where I have the hook, is on player_hurt along with the other 2 things I mentioned. The code in my original post is the line I used however nothing happens.
Forum: Scripting 09-15-2012, 13:48
Replies: 20
Views: 9,656
Posted By mikehawk1339
Re: [CSS] One hit kill with knife

Oh I see. I'm trying to convert all my Eventscript plugins to SM and I used player_hurt in ES. Probably because stuff like SDKHooks don't exist in ES. That's why I used player_hurt. Additionally I...
Forum: Scripting 09-15-2012, 09:44
Replies: 20
Views: 9,656
Posted By mikehawk1339
Re: [CSS] One hit kill with knife

Is there a reason to use OnTakeDamage over player_hurt? Currently I have something like this,

public Action:PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
new index =...
Forum: Scripting 09-14-2012, 23:05
Replies: 20
Views: 9,656
Posted By mikehawk1339
Re: [CSS] One hit kill with knife

The "//" line is the default native that I found on the SDKHooks post for reference, it is not really used in my actual code. I hooked the event player_hurt and have it fire in that event. The entity...
Forum: Scripting 09-14-2012, 22:16
Replies: 20
Views: 9,656
Posted By mikehawk1339
[CSS] One hit kill with knife

I want knives to one hit kill, regardless of how much HP the victim has. Using SDKHooks, I have the line


//SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType, weapon=-1,...
Forum: Scripting 09-14-2012, 17:05
Replies: 13
Views: 3,125
Posted By mikehawk1339
Re: [CSS] Help with IsFakeClient

It worked when I used sm_rename and it was able to rename a bot.
Forum: Scripting 09-13-2012, 22:49
Replies: 13
Views: 3,125
Posted By mikehawk1339
Re: [CSS] Help with IsFakeClient

That got rid of the error messages, thanks.
Forum: Scripting 09-13-2012, 20:19
Replies: 13
Views: 3,125
Posted By mikehawk1339
[CSS] Help with IsFakeClient

I am using IsFakeClient to determine of the player is a bot. However I will get errors such as "Client index 0 is invalid". I tried pairing it with IsClientConnected as others have mentioned but I...
Forum: Scripting 08-27-2012, 23:46
Replies: 1
Views: 2,016
Posted By mikehawk1339
Round a decimal

This may seem like a dumb question, but how do I round a float to an integer in sourcemod?

For example, I get the players current HP, give them a bonus HP amount and multiply the bonus by 0.35....
Forum: Scripting 08-22-2012, 21:08
Replies: 12
Views: 2,474
Posted By mikehawk1339
Re: [CSS] Assigning a property to a userid

Thanks for the clarification. I changed the ClassBuffer(index) to ClassBuffer[index] and ClassBuffer(attacker) to ClassBuffer[attacker], however when a player dies, nothing shows up in the spot where...
Forum: Scripting 08-21-2012, 23:05
Replies: 12
Views: 2,474
Posted By mikehawk1339
Re: [CSS] Assigning a property to a userid

Okay so I tried to make a small script using my example. In this plugin I want to assign a player a class when they spawn. When they die, it tells the server who died, what class they were, and what...
Forum: Scripting 08-19-2012, 21:04
Replies: 12
Views: 2,474
Posted By mikehawk1339
Re: [CSS] Assigning a property to a userid

Okay, so I'm guessing that if there are 8 players on the server, it will fill those arrays like this.

Civilian{1, 6, 2, 8, 5}
Sniper{4, 7}
Bomber{3}

If I had like 10 classes, would I have to...
Forum: Scripting 08-19-2012, 19:06
Replies: 12
Views: 2,474
Posted By mikehawk1339
Re: [CSS] Assigning a property to a userid

Thanks for the examples. Can the enums save more than one userid as the same class? For example 3 people are chosen to be a civilian.
Forum: Scripting 08-19-2012, 17:04
Replies: 12
Views: 2,474
Posted By mikehawk1339
Re: [CSS] Assigning a property to a userid

So basically I have to create an array for each class, then have to loop through them ?
Forum: Scripting 08-19-2012, 14:51
Replies: 12
Views: 2,474
Posted By mikehawk1339
[CSS] Assigning a property to a userid

I want to assign a property to a userid, meaning set a player specific variable and be able to retrieve it later. For example I have 3 classes; civilian, sniper, bomber. When a player spawns, I want...
Forum: Scripting 08-19-2012, 14:38
Replies: 23
Views: 4,213
Posted By mikehawk1339
Re: [CSS] Event fires too fast

Thanks. I got the plugin working fine.
Showing results 1 to 25 of 63

 
Forum Jump

All times are GMT -4. The time now is 00:57.


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