Raised This Month: $ Target: $400
 0% 

Tag Mismatch?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sake
Senior Member
Join Date: Jul 2011
Old 07-16-2011 , 15:19   Tag Mismatch?
Reply With Quote #1

PHP Code:
/* Script generated by Pawn Studio */

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

#define PLUGIN    "csdmsake"
#define AUTHOR    "sake"
#define VERSION    "1.0"
#define NO_TEAM "UNASSIGNED"
#define SPEC    "SPECTATOR"

new sv_money 2000;

public 
plugin_init()
{
    if(
cstrike_running())
    {
        
register_plugin(PLUGINVERSIONAUTHOR);
        @
sv_money register_cvar("sv_money","2000",FCVAR_SERVER,2000);
        
RegisterHam(Ham_Spawn,"player","onPlayerSpawn",1)
        
register_event("DeathMsg""playerKilled""a");
        
register_event("TeamInfo""teamAssigned""a");
        
register_clcmd("say /unstuck""unstuck"0)
    }
}

public 
playerKilled()
{
    new 
victim read_data(2);
    
set_task(0.5,"spawnPlayer",victim);
    return 
PLUGIN_CONTINUE;
}

public 
onPlayerSpawn(id)
{
    if(
is_user_alive(id))
    {
        
give_item(id,"weapon_awp");
        new 
string [16];
        
format(string15"%d"cs_get_user_money(id)); 
        
show_hudmessage(0string);
        new 
money cs_get_user_money(id) + sv_money;
        
cs_set_user_money(idmoney);
    }
    return 
PLUGIN_CONTINUE;        
}

public 
spawnPlayer(id)
{
    new 
team cs_get_user_team(id)
    @if((
team == || team == 2) && !is_user_hltv(id))
    {
        
spawn(id);
    }
    return 
PLUGIN_CONTINUE;
}

public 
killUser(id)
{
    new 
team cs_get_user_team(id)
    @if((
team == || team == 2) && !is_user_hltv(id))
    {
        
user_kill(id);
    }
    return 
PLUGIN_CONTINUE;
}


public 
unstuck(id)
{
    
show_hudmessage(0,"unstucking Player!");
    
set_task(0.5,"spawnPlayer",id);
    
set_task(0.5,"killUser",id);
    return 
PLUGIN_CONTINUE;
}

public 
teamAssigned()
{
    new 
id read_data(1);
    new 
string[16];
    
read_data(2,string,15);
    if(
strcmp(string,NO_TEAM)==0||strcmp(string,SPEC))
    {
        return 
PLUGIN_CONTINUE;
    }
    if(!
is_user_alive(id))
    {
        
spawnPlayer(id);
    }
    return 
PLUGIN_CONTINUE;

I don't get it. Why do i get a compiler Warning that here (lines marked with @) are tag mismatches? What am I doing wrong?

I already had some issues with CS_TEAM_CT. So I changed it to 1 and 2.

greetings

sake
sake is offline
 


Thread Tools
Display Modes

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 01:08.


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