AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get_user_aiming and non-players (https://forums.alliedmods.net/showthread.php?t=10009)

TotalNoobScripter 02-06-2005 00:14

get_user_aiming and non-players
 
Can someone give me an example of get_user_aiming, that would recieve a entity name and would do for example, a client print if the entity classname was woot1 ? I do not know how to use get_user_aiming with a non-player, even though it probably is quite simple; i can't figure it out.

XxAvalanchexX 02-06-2005 00:29

Code:
new entity, hitpart; get_user_aiming(id,entity,hitpart); // make sure valid entity and not a player if(is_valid_ent(entity) && !is_user_connected(entity)) {    new classname[32];    entity_get_string(entity,EV_SZ_classname,classname,31);    if(equal(classname,"woot1")) {       // so-and-so    } }

TotalNoobScripter 02-06-2005 01:02

well, that was idiotic of me.


All times are GMT -4. The time now is 19:26.

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