Raised This Month: $51 Target: $400
 12% 

get_user_rendering ? oO


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-19-2008 , 07:04   get_user_rendering ? oO
Reply With Quote #1

is there a way to get is player rendering with something or no ?
__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-19-2008 , 07:26   Re: get_user_rendering ? oO
Reply With Quote #2

Use pev and retrieve pev values.

If you really need a stock :
PHP Code:
get_user_rendering(id, &fx, &Float:flRed, &Float:flGreen, &Float:flBlue, &rendermode, &Float:renderamt)
{
    new 
Float:flColor[3]
    
fx pev(idpev_renderfx)
    
pev(idpev_rendercolorflColor)
    
flRed flColor[0]
    
flGreen flColor[1]
    
flBlue flColor[2]
    
rendermode pev(idpev_rendermode)
    
pev(idpev_renderamtrenderamt)

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-19-2008 at 12:23.
ConnorMcLeod is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 12-19-2008 , 11:57   Re: get_user_rendering ? oO
Reply With Quote #3

Quote:
Originally Posted by connorr View Post
Use pev and retrieve pev values.

If you really need a stock :
PHP Code:
get_user_rendering(id, &fx, &Float:flColor[3], &rendermode, &Float:renderamt)
{
    
fx pev(idpev_renderfx)
    
pev(idpev_rendercolorflColor)
    
rendermode pev(idpev_rendermode)
    
pev(idpev_renderamtrenderamt)

You slipped something: arrays are passe by reference by default, you can't use the &.
__________________

Community / No support through PM
danielkza is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-19-2008 , 12:24   Re: get_user_rendering ? oO
Reply With Quote #4

I beg you pardon ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 12-19-2008 , 18:25   Re: get_user_rendering ? oO
Reply With Quote #5

Code:
&Float:flColor[3]
He's saying that the above ampersand is superfluous because when passing arrays, its address rather than value is what's supplied to the function in all cases.

On compilation you'll receive error 067.

Quote:
variable cannot be both a reference and an array (variable "flColor")
__________________
No support via PM.
Lee is offline
Reply



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 16:20.


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