Tag Mismatch?
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(PLUGIN, VERSION, AUTHOR); @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(string, 15, "%d", cs_get_user_money(id)); show_hudmessage(0, string); new money = cs_get_user_money(id) + sv_money; cs_set_user_money(id, money); } return PLUGIN_CONTINUE; }
public spawnPlayer(id) { new team = cs_get_user_team(id) @if((team == 1 || team == 2) && !is_user_hltv(id)) { spawn(id); } return PLUGIN_CONTINUE; }
public killUser(id) { new team = cs_get_user_team(id) @if((team == 1 || 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
|