Raised This Month: $ Target: $400
 0% 

[HELP] Need Respawn dead player as Terrorist


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
filo
BANNED
Join Date: Jul 2008
Location: Venezuela, What did you
Old 09-09-2008 , 12:48   [HELP] Need Respawn dead player as Terrorist
Reply With Quote #1

I am too new scripthing (this is my first scripth) and i want to know what is wrong with my code

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>


#define PLUGIN "Respawn as T"
#define VERSION "1.0"
#define AUTHOR "Filo"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say respawn""respawn")


}


public 
respawn(id)
{
    if(
is_user_connected(id))
    {
        if (
get_user_health"0"))
    
set_user_health "100" )
    
cs_set_user_team "1" )
        
}


Last edited by filo; 09-09-2008 at 13:15.
filo is offline
Send a message via AIM to filo Send a message via MSN to filo
EvolDay
Senior Member
Join Date: Apr 2008
Location: Canada
Old 09-09-2008 , 13:21   Re: [HELP] Need Respawn dead player as Terrorist
Reply With Quote #2

You are missing #include <fakemeta> and

cs_set_user_team ( "1" ) to cs_set_user_team (id,CS_TEAM_T)

and i dont think you need fun or amxmisc
__________________
EvolDay is offline
filo
BANNED
Join Date: Jul 2008
Location: Venezuela, What did you
Old 09-09-2008 , 13:25   Re: [HELP] Need Respawn dead player as Terrorist
Reply With Quote #3

Well I did it now the code is:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta>

#define PLUGIN "Respawn as T"
#define VERSION "1.0"
#define AUTHOR "Filo"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say respawn""respawn")


}


public 
respawn(id)
{
    if(
is_user_connected(id))
    if (
get_user_health("0"))
    {        
    
set_user_health ("100")
    
cs_set_user_team (id,CS_TEAM_T
        
print_chat ("You has been Respawned as Terrorist")
}

But I have these errors:

Warning: Loose indentation on line 16
Error: Argument type mismatch (argument 1) on line 25
Error: Argument type mismatch (argument 1) on line 27
Error: Invalid function call, not a valid address on line 29
Warning: Expression has no effect on line 29
Error: Expected token: ";", but found ")" on line 29
Error: Invalid expression, assumed zero on line 29
Error: Too many error messages on one line on line 29

Compilation aborted.
6 Errors.

Last edited by filo; 09-09-2008 at 13:28.
filo is offline
Send a message via AIM to filo Send a message via MSN to filo
EvolDay
Senior Member
Join Date: Apr 2008
Location: Canada
Old 09-09-2008 , 13:32   Re: [HELP] Need Respawn dead player as Terrorist
Reply With Quote #4

take away the set_user_health ("100") and if (get_user_health("0"))
__________________
EvolDay is offline
filo
BANNED
Join Date: Jul 2008
Location: Venezuela, What did you
Old 09-09-2008 , 13:38   Re: [HELP] Need Respawn dead player as Terrorist
Reply With Quote #5

Finally Copiled go to test it
filo is offline
Send a message via AIM to filo Send a message via MSN to filo
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 03:13.


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