AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]Supress Tag Missmatch (https://forums.alliedmods.net/showthread.php?t=87295)

TeddyDesTodes 03-09-2009 14:56

[SOLVED]Supress Tag Missmatch
 
Okay i have some code and i want to write some floats to a file
like this:
fread(g_FileHandler[owner],veloc[2],BLOCK_INT)
writing and reading works so far but i cant release the plugin until these tag missmatches are gone (20 in total:mrgreen:)

i need some sort of casting but without changing the value
so i dont want floatround(veloc[2]) or anything like this

Emp` 03-09-2009 16:11

Re: Supress Tag Missmatch
 
Show the full code. I don't see why you don't just write the float into it and read it.

TeddyDesTodes 03-09-2009 16:23

Re: Supress Tag Missmatch
 
Code:

/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#define PLUGIN    "Ghost Recorder"
#define AUTHOR    "TeddyDesTodes"
#define VERSION    "0.1"
#define MAXPLAYERS 33
new g_FileHandler[MAXPLAYERS]
//new g_sync_disp
new Float:g_LastThink[MAXPLAYERS]
new g_TotalThink[MAXPLAYERS]
new Float:g_LastAngle[MAXPLAYERS][3]
new Float:g_LastOrigin[MAXPLAYERS][3]
new Float:g_LastVelocity[MAXPLAYERS][3]
new g_isRecording[MAXPLAYERS];
new g_isPause[MAXPLAYERS];
new g_Menu

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_forward(FM_Think,"fm_ghost_think",0)
    register_forward(FM_PlayerPostThink,"fm_plr_prethink",0)
    //register_clcmd("say /recorddemo","start_record")
    //register_clcmd("say /replay","start_replay")
    //register_clcmd("say /stoprecord","stop_record")
    register_clcmd("say /demomenu","menu_show")
    g_Menu = menu_create("Demo Recording", "menuhandler")
    //g_sync_disp = CreateHudSyncObj()
    menu_additem(g_Menu, "Toggle Record", "record");
    menu_additem(g_Menu, "Play Demo", "play");
    menu_additem(g_Menu, "Pause Demo", "pause");
    menu_additem(g_Menu, "Stop Demo", "stop");
}
public plugin_precache(){
    precache_model( "models/player/vip/vip.mdl" );
}
public client_putinserver(id){
    g_FileHandler[id] = 0;
    g_isRecording[id] = 0;
    g_isPause[id] = 0;
    g_LastThink[id] = get_gametime();
    g_TotalThink[id] = 0;
}
public plugin_end(){
    for(new i = 0; i < MAXPLAYERS; i++){
        if(g_FileHandler[i] != 0){
            fclose(g_FileHandler[i])
        }
    }
}
public client_disconnect(id){
   
    if(g_FileHandler[id] != 0){
        fclose(g_FileHandler[id]);
    }

}
public menu_show(id){
    menu_display(id,g_Menu,0);
}
public menuhandler(id,menu,item){
    if( item < 0 ) return PLUGIN_CONTINUE
    new cmd[16]
    new access, callback
    menu_item_getinfo(menu, item, access, cmd,15,_,_, callback)
    if(equal(cmd,"record")){
        if(g_isRecording[id] == 1){
            stop_record(id);
        }else{
            start_record(id);
        }
    }else if(equal(cmd,"play")){
        client_print(id,print_chat,"[Recorder] Starting playback")
        start_replay(id);
    }else if(equal(cmd,"stop")){
        client_print(id,print_chat,"[Recorder] Stopping playback")
        g_isPause[id] = 0;
        g_FileHandler[id] = 0;
    }else if(equal(cmd,"pause")){
        if(g_isPause[id] == 0){
            g_isPause[id] = 1
            client_print(id,print_chat,"[Recorder] Playback paused")
        }else{
            g_isPause[id] = 0
            client_print(id,print_chat,"[Recorder] Playback resumed")
        }
    }
    menu_display(id,g_Menu,0);
    return PLUGIN_HANDLED
}
public fm_ghost_think(id){
    static szClassname[13]
    pev(id,pev_classname, szClassname,12)
    if( !equal(szClassname, "ghost_player") )
        return FMRES_IGNORED;
    //log_amx("ghost think")
    static Float:ago,Float:origin[3],Float:angles[3],Float:veloc[3];
    static owner,data,sequence,gaitsequence
    owner = pev(id,pev_owner);
    if(!is_user_connected(owner)) return FMRES_IGNORED;
    if(g_isPause[owner] == 1){
        set_pev(id,pev_nextthink,get_gametime()+0.5)
        return FMRES_IGNORED
    }
    fread(g_FileHandler[owner],angles[0],BLOCK_INT)
    fread(g_FileHandler[owner],angles[1],BLOCK_INT)
    fread(g_FileHandler[owner],angles[2],BLOCK_INT)
    fread(g_FileHandler[owner],origin[0],BLOCK_INT)
    fread(g_FileHandler[owner],origin[1],BLOCK_INT)
    fread(g_FileHandler[owner],origin[2],BLOCK_INT)
    fread(g_FileHandler[owner],veloc[0],BLOCK_INT)
    fread(g_FileHandler[owner],veloc[1],BLOCK_INT)
    fread(g_FileHandler[owner],veloc[2],BLOCK_INT)
    fread(g_FileHandler[owner],sequence,BLOCK_INT)
    fread(g_FileHandler[owner],gaitsequence,BLOCK_INT)
    data = fread(g_FileHandler[owner],ago,BLOCK_INT)
    //log_amx("%f(%f,%f,%f)(%f,%f,%f)(%f,%f,%f) %d %d",ago,origin[0],origin[1],origin[2],angles[0],angles[1],angles[2],veloc[0],veloc[1],veloc[2],sequence,gaitsequence);
    if(data != 1){
        client_print(owner,print_chat,"[Recorder] Playback Finished")
        if(g_FileHandler[owner] != 0)fclose(g_FileHandler[owner]);
        g_FileHandler[owner] = 0;
        remove_entity(id);       
        return FMRES_IGNORED;
    }
    set_pev(id,pev_nextthink,get_gametime()+ago)
    set_pev(id,pev_origin,origin)
    set_pev(id,pev_angles,angles)
    set_pev(id,pev_velocity,veloc)
    set_pev(id,pev_gaitsequence,sequence)
    set_pev(id,pev_sequence,gaitsequence)
    //set_hudmessage(_, _, _, 0.03, 0.93, _, 0.2, 0.2)
    //ShowSyncHudMsg(owner, g_sync_disp,"%f(%f,%f,%f)(%f,%f,%f)(%f,%f,%f)%d %d",ago,origin[0],origin[1],origin[2],angles[0],angles[1],angles[2],veloc[0],veloc[1],veloc[2],sequence,gaitsequence)
    return FMRES_HANDLED;
    floa
}
public start_replay(id){
    log_amx("starting replay")
    if(g_FileHandler[id] != 0){
        client_print(id,print_chat,"[Recorder] Can't open File, maybe you are still recording")
        return PLUGIN_CONTINUE;
    }
    new sid[35], mapname[33],fileName[129];
    get_mapname(mapname,32);
    get_user_authid(id,sid,34);
    replace_all(sid,34,":","_");
    format(fileName,128,"kzrecord/%s%s.rec",sid,mapname);
    g_FileHandler[id] = fopen(fileName,"rb");
    if(g_FileHandler[id] == 0){
        client_print(id,print_chat,"[Recorder] Couldn't open file mybe none existent")
    }else{
        client_print(id,print_chat,"[Recorder] Playback started")
        fnCreateGhost(id)
        new dummy
        fread(g_FileHandler[id],dummy,BLOCK_INT)
    }
    return PLUGIN_HANDLED
}
public fm_plr_prethink(id){
    if(is_user_alive(id) && g_isRecording[id] != 0){
        static Float:ago,Float:origin[3],Float:angles[3],Float:veloc[3];
        static sequence,gaitsequence
        ago = get_gametime()-g_LastThink[id]
        if(ago < 0.03) return FMRES_IGNORED
        pev(id,pev_origin,origin)
        pev(id,pev_velocity,veloc)
        pev(id,pev_angles,angles)
        sequence = pev(id,pev_sequence)
        gaitsequence = pev(id,pev_gaitsequence)
        if((g_LastAngle[id][0] == angles[0] && g_LastAngle[id][1] == angles[1] && g_LastAngle[id][2] == angles[2] ) && (g_LastOrigin[id][0] == origin[0] && g_LastOrigin[id][1] == origin[1] && g_LastOrigin[id][2] == origin[2] ) && (g_LastVelocity[id][0] == veloc[0] &&    g_LastVelocity[id][1] == veloc[1] && g_LastVelocity[id][2] == veloc[2])) return FMRES_IGNORED
        g_LastAngle[id][0] = angles[0]
        g_LastAngle[id][1] = angles[1]
        g_LastAngle[id][2] = angles[2]
        g_LastOrigin[id][0] = origin[0]
        g_LastOrigin[id][1] = origin[1]
        g_LastOrigin[id][2] = origin[2]
        g_LastVelocity[id][0] = veloc[0]
        g_LastVelocity[id][1] = veloc[1]
        g_LastVelocity[id][2] = veloc[2]
        g_LastThink[id] = get_gametime()
        g_TotalThink[id]++;
        fwrite(g_FileHandler[id],ago,BLOCK_INT)
        fwrite(g_FileHandler[id],angles[0],BLOCK_INT)
        fwrite(g_FileHandler[id],angles[1],BLOCK_INT)
        fwrite(g_FileHandler[id],angles[2],BLOCK_INT)
        fwrite(g_FileHandler[id],origin[0],BLOCK_INT)
        fwrite(g_FileHandler[id],origin[1],BLOCK_INT)
        fwrite(g_FileHandler[id],origin[2],BLOCK_INT)
        fwrite(g_FileHandler[id],veloc[0],BLOCK_INT)
        fwrite(g_FileHandler[id],veloc[1],BLOCK_INT)
        fwrite(g_FileHandler[id],veloc[2],BLOCK_INT)
        fwrite(g_FileHandler[id],sequence,BLOCK_INT)
        fwrite(g_FileHandler[id],gaitsequence,BLOCK_INT)
        //set_hudmessage(_, _, _, 0.03, 0.93, _, 0.2, 0.2)
        //ShowSyncHudMsg(id, g_sync_disp,"%d Thinks recorded",g_TotalThink[id])
        return FMRES_HANDLED
    }
    return FMRES_IGNORED
}
public start_record(id){
    new sid[35], mapname[33],fileName[129];
    get_mapname(mapname,32);
    get_user_authid(id,sid,34);
    replace_all(sid,34,":","_");
    format(fileName,128,"kzrecord/%s%s.rec",sid,mapname);
    g_FileHandler[id] = fopen(fileName,"wb");
    g_isRecording[id] = 1;
    client_print(id,print_chat,"[Recorder] Recording started")
}
public stop_record(id){
    g_isRecording[id] = 0
    fclose(g_FileHandler[id])
    g_FileHandler[id] = 0
    client_print(id,print_chat,"[Recorder] Recording stoped")
}
 public fnCreateGhost( iOwner ) {
    new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
        //make sure entity was created successfully
    if (pev_valid(ent)) {
        dllfunc(DLLFunc_Spawn,ent)
        engfunc(EngFunc_SetModel,ent,"models/player/vip/vip.mdl")
        set_pev(ent, pev_classname, "ghost_player");
        set_pev(ent, pev_solid, SOLID_NOT);
        set_pev(ent,pev_movetype,MOVETYPE_PUSHSTEP);
        set_pev(ent, pev_owner, iOwner);
        //set_pev(ent,pev_gravity, 1.0)
        //set_pev(ent,pev_friction, 1.0)
        set_pev(ent,pev_animtime, 2.0)
        set_pev(ent,pev_framerate, 1.0)
        //set_pev(ent,pev_movetype, MOVETYPE_PUSHSTEP);
        set_pev(ent,pev_flags, FL_MONSTER);
        set_pev(ent,pev_controller_0, 125)
        set_pev(ent,pev_controller_1, 125)
        set_pev(ent,pev_controller_2, 125)
        set_pev(ent,pev_controller_3, 125)
        fm_set_rendering(ent, kRenderFxGlowShell, 255, 255, 255, kRenderTransAlpha, 150);
        set_pev(ent, pev_nextthink, get_gametime() + 0.1);
    }else{
        client_print(id,print_chat,"[Recorder] Ghost couldn't be created")
        fclose(g_FileHandler[iOwner])
    }
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) {
    static Float:color[3]; color[2] = float(b), color[0] = float(r), color[1] = float(g);
    set_pev(entity, pev_renderfx,    fx);
    set_pev(entity, pev_rendercolor, color);
    set_pev(entity, pev_rendermode,    render);
    set_pev(entity, pev_renderamt,    float(amount));
    return 1;
}

Code:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Z:\cstrike\amxx\record.sma(109) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(110) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(111) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(112) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(113) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(114) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(115) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(116) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(117) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(120) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(185) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(186) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(187) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(188) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(189) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(190) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(191) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(192) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(193) : warning 213: tag mismatch
Z:\cstrike\amxx\record.sma(194) : warning 213: tag mismatch
Header size:          1068 bytes
Code size:            12392 bytes
Data size:            5356 bytes
Stack/heap size:      16384 bytes; max. usage is unknown, due to recursion
Total requirements:  35200 bytes

20 Warnings.
Done.

Compilation Time: 1,10 sec

thats why ugly warning

Emp` 03-09-2009 17:10

Re: Supress Tag Missmatch
 
Try:
Code:

/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#define PLUGIN    "Ghost Recorder"
#define AUTHOR    "TeddyDesTodes"
#define VERSION    "0.1"
#define MAXPLAYERS 33
new g_FileHandler[MAXPLAYERS]
//new g_sync_disp
new Float:g_LastThink[MAXPLAYERS]
new g_TotalThink[MAXPLAYERS]
new Float:g_LastAngle[MAXPLAYERS][3]
new Float:g_LastOrigin[MAXPLAYERS][3]
new Float:g_LastVelocity[MAXPLAYERS][3]
new g_isRecording[MAXPLAYERS];
new g_isPause[MAXPLAYERS];
new g_Menu

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_forward(FM_Think,"fm_ghost_think",0)
    register_forward(FM_PlayerPostThink,"fm_plr_prethink",0)
    //register_clcmd("say /recorddemo","start_record")
    //register_clcmd("say /replay","start_replay")
    //register_clcmd("say /stoprecord","stop_record")
    register_clcmd("say /demomenu","menu_show")
    g_Menu = menu_create("Demo Recording", "menuhandler")
    //g_sync_disp = CreateHudSyncObj()
    menu_additem(g_Menu, "Toggle Record", "record");
    menu_additem(g_Menu, "Play Demo", "play");
    menu_additem(g_Menu, "Pause Demo", "pause");
    menu_additem(g_Menu, "Stop Demo", "stop");
}
public plugin_precache(){
    precache_model( "models/player/vip/vip.mdl" );
}
public client_putinserver(id){
    g_FileHandler[id] = 0;
    g_isRecording[id] = 0;
    g_isPause[id] = 0;
    g_LastThink[id] = get_gametime();
    g_TotalThink[id] = 0;
}
public plugin_end(){
    for(new i = 0; i < MAXPLAYERS; i++){
        if(g_FileHandler[i] != 0){
            fclose(g_FileHandler[i])
        }
    }
}
public client_disconnect(id){
   
    if(g_FileHandler[id] != 0){
        fclose(g_FileHandler[id]);
    }

}
public menu_show(id){
    menu_display(id,g_Menu,0);
}
public menuhandler(id,menu,item){
    if( item < 0 ) return PLUGIN_CONTINUE
    new cmd[16]
    new access, callback
    menu_item_getinfo(menu, item, access, cmd,15,_,_, callback)
    if(equal(cmd,"record")){
        if(g_isRecording[id] == 1){
            stop_record(id);
        }else{
            start_record(id);
        }
    }else if(equal(cmd,"play")){
        client_print(id,print_chat,"[Recorder] Starting playback")
        start_replay(id);
    }else if(equal(cmd,"stop")){
        client_print(id,print_chat,"[Recorder] Stopping playback")
        g_isPause[id] = 0;
        g_FileHandler[id] = 0;
    }else if(equal(cmd,"pause")){
        if(g_isPause[id] == 0){
            g_isPause[id] = 1
            client_print(id,print_chat,"[Recorder] Playback paused")
        }else{
            g_isPause[id] = 0
            client_print(id,print_chat,"[Recorder] Playback resumed")
        }
    }
    menu_display(id,g_Menu,0);
    return PLUGIN_HANDLED
}
public fm_ghost_think(id){
    static szClassname[13]
    pev(id,pev_classname, szClassname,12)
    if( !equal(szClassname, "ghost_player") )
        return FMRES_IGNORED;
    //log_amx("ghost think")
    static Float:ago,Float:origin[3],Float:angles[3],Float:veloc[3];
    static owner,data,sequence,gaitsequence
    owner = pev(id,pev_owner);
    if(!is_user_connected(owner)) return FMRES_IGNORED;
    if(g_isPause[owner] == 1){
        set_pev(id,pev_nextthink,get_gametime()+0.5)
        return FMRES_IGNORED
    }
        static tempread, i;
        for( i=0; i<3; i++ ){
                fread(g_FileHandler[owner],tempread,BLOCK_INT)
                angles[i] = float(tempread);
        }
        for( i=0; i<3; i++ ){
                fread(g_FileHandler[owner],tempread,BLOCK_INT)
                origin[i] = float(tempread);
        }
        for( i=0; i<3; i++ ){
                fread(g_FileHandler[owner],tempread,BLOCK_INT)
                veloc[i] = float(tempread);
        }
    fread(g_FileHandler[owner],sequence,BLOCK_INT)
    fread(g_FileHandler[owner],gaitsequence,BLOCK_INT)
    data = fread(g_FileHandler[owner],ago,BLOCK_INT)
    //log_amx("%f(%f,%f,%f)(%f,%f,%f)(%f,%f,%f) %d %d",ago,origin[0],origin[1],origin[2],angles[0],angles[1],angles[2],veloc[0],veloc[1],veloc[2],sequence,gaitsequence);
    if(data != 1){
        client_print(owner,print_chat,"[Recorder] Playback Finished")
        if(g_FileHandler[owner] != 0)fclose(g_FileHandler[owner]);
        g_FileHandler[owner] = 0;
        remove_entity(id);       
        return FMRES_IGNORED;
    }
    set_pev(id,pev_nextthink,get_gametime()+ago)
    set_pev(id,pev_origin,origin)
    set_pev(id,pev_angles,angles)
    set_pev(id,pev_velocity,veloc)
    set_pev(id,pev_gaitsequence,sequence)
    set_pev(id,pev_sequence,gaitsequence)
    //set_hudmessage(_, _, _, 0.03, 0.93, _, 0.2, 0.2)
    //ShowSyncHudMsg(owner, g_sync_disp,"%f(%f,%f,%f)(%f,%f,%f)(%f,%f,%f)%d %d",ago,origin[0],origin[1],origin[2],angles[0],angles[1],angles[2],veloc[0],veloc[1],veloc[2],sequence,gaitsequence)
    return FMRES_HANDLED;
}
public start_replay(id){
    log_amx("starting replay")
    if(g_FileHandler[id] != 0){
        client_print(id,print_chat,"[Recorder] Can't open File, maybe you are still recording")
        return PLUGIN_CONTINUE;
    }
    new sid[35], mapname[33],fileName[129];
    get_mapname(mapname,32);
    get_user_authid(id,sid,34);
    replace_all(sid,34,":","_");
    format(fileName,128,"kzrecord/%s%s.rec",sid,mapname);
    g_FileHandler[id] = fopen(fileName,"rb");
    if(g_FileHandler[id] == 0){
        client_print(id,print_chat,"[Recorder] Couldn't open file mybe none existent")
    }else{
        client_print(id,print_chat,"[Recorder] Playback started")
        fnCreateGhost(id)
        new dummy
        fread(g_FileHandler[id],dummy,BLOCK_INT)
    }
    return PLUGIN_HANDLED
}
public fm_plr_prethink(id){
    if(is_user_alive(id) && g_isRecording[id] != 0){
        static Float:ago,Float:origin[3],Float:angles[3],Float:veloc[3];
        static sequence,gaitsequence
        ago = get_gametime()-g_LastThink[id]
        if(ago < 0.03) return FMRES_IGNORED
        pev(id,pev_origin,origin)
        pev(id,pev_velocity,veloc)
        pev(id,pev_angles,angles)
        sequence = pev(id,pev_sequence)
        gaitsequence = pev(id,pev_gaitsequence)
        if((g_LastAngle[id][0] == angles[0] && g_LastAngle[id][1] == angles[1] && g_LastAngle[id][2] == angles[2] ) && (g_LastOrigin[id][0] == origin[0] && g_LastOrigin[id][1] == origin[1] && g_LastOrigin[id][2] == origin[2] ) && (g_LastVelocity[id][0] == veloc[0] &&    g_LastVelocity[id][1] == veloc[1] && g_LastVelocity[id][2] == veloc[2])) return FMRES_IGNORED
        g_LastAngle[id][0] = angles[0]
        g_LastAngle[id][1] = angles[1]
        g_LastAngle[id][2] = angles[2]
        g_LastOrigin[id][0] = origin[0]
        g_LastOrigin[id][1] = origin[1]
        g_LastOrigin[id][2] = origin[2]
        g_LastVelocity[id][0] = veloc[0]
        g_LastVelocity[id][1] = veloc[1]
        g_LastVelocity[id][2] = veloc[2]
        g_LastThink[id] = get_gametime()
        g_TotalThink[id]++;
        fwrite(g_FileHandler[id],ago,BLOCK_INT)
        fwrite(g_FileHandler[id],_:angles[0],BLOCK_INT)
        fwrite(g_FileHandler[id],_:angles[1],BLOCK_INT)
        fwrite(g_FileHandler[id],_:angles[2],BLOCK_INT)
        fwrite(g_FileHandler[id],_:origin[0],BLOCK_INT)
        fwrite(g_FileHandler[id],_:origin[1],BLOCK_INT)
        fwrite(g_FileHandler[id],_:origin[2],BLOCK_INT)
        fwrite(g_FileHandler[id],_:veloc[0],BLOCK_INT)
        fwrite(g_FileHandler[id],_:veloc[1],BLOCK_INT)
        fwrite(g_FileHandler[id],_:veloc[2],BLOCK_INT)
        fwrite(g_FileHandler[id],sequence,BLOCK_INT)
        fwrite(g_FileHandler[id],gaitsequence,BLOCK_INT)
        //set_hudmessage(_, _, _, 0.03, 0.93, _, 0.2, 0.2)
        //ShowSyncHudMsg(id, g_sync_disp,"%d Thinks recorded",g_TotalThink[id])
        return FMRES_HANDLED
    }
    return FMRES_IGNORED
}
public start_record(id){
    new sid[35], mapname[33],fileName[129];
    get_mapname(mapname,32);
    get_user_authid(id,sid,34);
    replace_all(sid,34,":","_");
    format(fileName,128,"kzrecord/%s%s.rec",sid,mapname);
    g_FileHandler[id] = fopen(fileName,"wb");
    g_isRecording[id] = 1;
    client_print(id,print_chat,"[Recorder] Recording started")
}
public stop_record(id){
    g_isRecording[id] = 0
    fclose(g_FileHandler[id])
    g_FileHandler[id] = 0
    client_print(id,print_chat,"[Recorder] Recording stoped")
}
 public fnCreateGhost( iOwner ) {
    new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
        //make sure entity was created successfully
    if (pev_valid(ent)) {
        dllfunc(DLLFunc_Spawn,ent)
        engfunc(EngFunc_SetModel,ent,"models/player/vip/vip.mdl")
        set_pev(ent, pev_classname, "ghost_player");
        set_pev(ent, pev_solid, SOLID_NOT);
        set_pev(ent,pev_movetype,MOVETYPE_PUSHSTEP);
        set_pev(ent, pev_owner, iOwner);
        //set_pev(ent,pev_gravity, 1.0)
        //set_pev(ent,pev_friction, 1.0)
        set_pev(ent,pev_animtime, 2.0)
        set_pev(ent,pev_framerate, 1.0)
        //set_pev(ent,pev_movetype, MOVETYPE_PUSHSTEP);
        set_pev(ent,pev_flags, FL_MONSTER);
        set_pev(ent,pev_controller_0, 125)
        set_pev(ent,pev_controller_1, 125)
        set_pev(ent,pev_controller_2, 125)
        set_pev(ent,pev_controller_3, 125)
        fm_set_rendering(ent, kRenderFxGlowShell, 255, 255, 255, kRenderTransAlpha, 150);
        set_pev(ent, pev_nextthink, get_gametime() + 0.1);
    }else{
        client_print(id,print_chat,"[Recorder] Ghost couldn't be created")
        fclose(g_FileHandler[iOwner])
    }
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) {
    static Float:color[3]; color[2] = float(b), color[0] = float(r), color[1] = float(g);
    set_pev(entity, pev_renderfx,    fx);
    set_pev(entity, pev_rendercolor, color);
    set_pev(entity, pev_rendermode,    render);
    set_pev(entity, pev_renderamt,    float(amount));
    return 1;
}


TeddyDesTodes 03-09-2009 17:23

Re: Supress Tag Missmatch
 
okay writing part works
but read doesnt (10 warnings left)

[record.amxx] 1116213247.999999 68.031249
left what is read , right what should be read
left is the actual unconvertet int value of the float

EDIT:
ok _: is working for read part too... dont really understand why but it works...


All times are GMT -4. The time now is 08:55.

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