Thread: CS Sprite fix
View Single Post
CheesyPeteza
Senior Member
Join Date: Feb 2004
Location: UK
Old 03-20-2004 , 08:41  
Reply With Quote #7

This code would be better placed in plugin_init() as it only needs to be done once:

Code:
	gMsgIconT = get_user_msgid("StatusIcon")
	gMsgIconCT = get_user_msgid("StatusIcon")
You should use get_maxplayers() here:
Code:
	for (new iPerson=1;iPerson<=get_playersnum();iPerson++)
Players can have index's that are higher than the number of players on the server if someone leaves the server.

I can't see a need for param being an array, its only if you use set_task you need to do that. Don't see why you need either of the params at all actually.

You can't be both T & CT so best to use switch instead of if. Plus no need to check they are alive twice.

I'll attach a file with these changes to you can see exactly what I mean.
Attached Files
File Type: sma Get Plugin or Get Source (csspritefix.sma - 2487 views - 2.0 KB)
__________________
YO|Cheesy Peteza

[email protected]

CheesyPeteza is offline