AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_view crashes my server (https://forums.alliedmods.net/showthread.php?t=63811)

BigDontCry 11-30-2007 16:20

set_view crashes my server
 
Hi. I'm just playing around a little with all the different stuff you can do with the engine module....

I made this:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "."


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
}

public 
client_putinserver(id) {
    
    if(!
is_user_bot(id) && !is_user_hltv(id)) {
        
set_view(idCAMERA_3RDPERSON)
    }


But whenever I try to connect to the server it crashes, but I can't see the problem with this code; it should work, right?

ConnorMcLeod 11-30-2007 16:31

Re: set_view crashes my server
 
Add this in the first code :

Code:
public plugin_precache() {     precache_model("models/rpgrocket.mdl") }

BigDontCry 11-30-2007 16:36

Re: set_view crashes my server
 
Quote:

Originally Posted by connorr (Post 558617)
Add this in the first code :

Code:
public plugin_precache() {     precache_model("models/rpgrocket.mdl") }

Yep... That fixed it... Another problem came up; the rendering of the player model isn't right. I was transparent. I tried to fix it with the set_user_rendering command but I still was 70% transparent when I use the set_view command..

Ah well... Who gives a sheit... No one wants to play 3rd person anyways... ;D Just playing around with the commands to learn... xD

Drak 11-30-2007 19:03

Re: set_view crashes my server
 
Quote:

Originally Posted by BigDontCry (Post 558620)
Yep... That fixed it... Another problem came up; the rendering of the player model isn't right. I was transparent. I tried to fix it with the set_user_rendering command but I still was 70% transparent when I use the set_view command..

Ah well... Who gives a sheit... No one wants to play 3rd person anyways... ;D Just playing around with the commands to learn... xD

That shouldn't be right. Try simply doing "set_user_rendering(id)".
If any effect is applied, that will remove it.

Emp` 11-30-2007 19:17

Re: set_view crashes my server
 
3rd person makes you semi transparent so you can see. there is no way around it.


All times are GMT -4. The time now is 11:04.

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