Raised This Month: $51 Target: $400
 12% 

old plugin .. ingnore it


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
R3pTy
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 08-24-2016 , 17:06   old plugin .. ingnore it
Reply With Quote #1

old plugin
i update + the plugin.
__________________

Last edited by R3pTy; 08-30-2016 at 14:36.
R3pTy is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-24-2016 , 17:14   Re: [HELP] Surf XP Levels Error
Reply With Quote #2

What errors are you getting?
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 08-24-2016 at 17:15.
wickedd is offline
R3pTy
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 08-24-2016 , 17:21   Re: [HELP] Surf XP Levels Error
Reply With Quote #3

8 errors.
Print here..
Attached Images
File Type: jpg dasdas.jpg (93.0 KB, 108 views)
__________________

Last edited by R3pTy; 08-24-2016 at 17:22.
R3pTy is offline
R3pTy
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 08-25-2016 , 15:56   Re: [HELP] Surf XP Levels Error
Reply With Quote #4

bump
__________________
R3pTy is offline
R3pTy
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 08-26-2016 , 15:53   Re: [HELP] Surf XP Levels Error
Reply With Quote #5

ahhh, no1 can help?
__________________
R3pTy is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-29-2016 , 10:50   Re: [HELP] Surf XP Levels Error
Reply With Quote #6

Lol, what the hell have you been doing to this code? Also, you're using fvault functions without even having an fvault include?

I have added the fvault include and the plugin compiles now. Although, you have some warnings but i don't know what you're trying to do.

You open nvault and assign it to g_vault but further you do nothing with it? Also, why do you use fvault and nvault at the same time? I'd recommend using either one of them.

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <fun> 
#include <hamsandwich> 
#include <colorchat> 
#include <cstrike> 
#include <nvault> 
#include <fakemeta> 
#include <fvault>

#define PLUGIN    "SURF XP MOD" 
#define AUTHOR    "Ardivaba" 
#define VERSION    "1.0" 

#define TUTORIAL 1001 
#define TASK_TUT 1111 

#define MSOUND "items/nvg_off.wav" 

enum RED 1BLUEYELLOWGREEN 

new const 
g_TutorPrecache[][] = { "gfx/career/icon_!.tga""gfx/career/icon_!-bigger.tga""gfx/career/icon_i.tga""gfx/career/icon_i-bigger.tga""gfx/career/icon_skulls.tga""gfx/career/round_corner_ne.tga""gfx/career/round_corner_nw.tga""gfx/career/round_corner_se.tga""gfx/career/round_corner_sw.tga""resource/TutorScheme.res""resource/UI/TutorTextWindow.res" 

new 
g_MsgTutor 
new g_MsgTutClose 

new const LEVELS[200] = { 
    
    
10
    
20
    
40
    
80
    
160
    ... 


enum _:Data
{
    
_csw[32],
    
_xp[32],
    
_model[64]
}

new const 
Stuff[][Data]=
{
    
"",
    {
CSW_KNIFE10"models/PFA/Surf/v_gknife.mdl"},
    {
CSW_DEAGLE20"models/PFA/Surf/v_gdeagle.mdl"},
    {
CSW_M330"models/PFA/Surf/v_gm3.mdl"},
    {
CSW_HEGRENADE40"models/PFA/Surf/v_shegrenade.mdl"},
    {
CSW_AK4750"models/PFA/Surf/v_gak47.mdl"},
    {
CSW_M4A150"models/PFA/Surf/v_gm4.mdl"},
    {
CSW_AWP100"models/PFA/Surf/v_gawp.mdl"},
    {
CSW_GLOCK18200"models/PFA/Surf/v_gglock.mdl"},
    {
CSW_USP200"models/PFA/Surf/v_gusp.mdl"}
}

new 
PXP33 
new 
PLEVEL33 
new 
PKS33 
new 
g_vault 

new SzMaxPlayersSzSayText

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR

    
register_event"DeathMsg""EventDeathMsg""a" 

    
register_clcmd"say /xp""printXp", -1"Ile masz Expa" 
    
register_clcmd"say /nivel""printLevel", -1"Jaki masz level" 
    
register_clcmd"say /proximonivel""printNewLevel", -1"Ile musisz miec jeszcze expa do nastepnego levela" 
    
register_clcmd"say /info""printInfo", -1"Wyswietla Info" 
    
register_clcmd"say /armas""printWeapons", -1"Info o Odblokowanych Broniach" 

    
register_event("CurWeapon","ev_CurWeapon""be""1=1"

    
RegisterHam(Ham_Spawn"player""EventPlayerSpawn"1
    
RegisterHam(Ham_TakeDamage"player""fwHamTakeDamage"

    
g_vault nvault_open("SURFXPMOD"

    
g_MsgTutor get_user_msgid("TutorText"
    
g_MsgTutClose get_user_msgid("TutorClose"


    
register_clcmd("say""hook_say")
    
register_clcmd("say_team""hook_say_team")
    
SzMaxPlayers get_maxplayers()
    
SzSayText get_user_msgid ("SayText")
    
register_message(SzSayText"MsgDuplicate")


public 
plugin_precache() 

    
precache_sound(MSOUND

    new 


    
for(0sizeof g_TutorPrecachei++)  
    {     
        
precache_generic(g_TutorPrecache[i]) 
    } 

    for(
1sizeof Stuffi++) {
        
precache_model(Stuff[i][_model])
    }


public 
hook_say(id)
{
    new 
SzMessages[192], SzName[32]
    new 
SzAlive is_user_alive(id)

    
read_args(SzMessages191)
    
remove_quotes(SzMessages)
    
get_user_name(idSzName31)

    new 
Admin 0iFlags get_user_flags(id

    if(
iFlags ADMIN_IMMUNITY) { // as flags que cada tag vai ter !!  
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_H) {
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_G) {
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_F) {
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_E) {
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_D) {
        
Admin 
    
}
    else if(
iFlags ADMIN_RESERVATION) {
        
Admin 
    
}
    else if(
iFlags ADMIN_USER) {
        
Admin 
    
}

    if(!
is_valid_msg(SzMessages)) {    
        return 
PLUGIN_CONTINUE
    }

    switch(
Admin
    {
        case 
1:
        {
            
format(SzMessages191"^1%s ^4[FUNDADOR] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
2:
        {
            
format(SzMessages191"^1%s ^4[LEADER] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
3:
        {
            
format(SzMessages191"^1%s ^4[ADMIN] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
4:
        {
            
format(SzMessages191"^1%s ^4[MOD.GERAL] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
5:
        {
            
format(SzMessages191"^1%s ^4[MOD] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
6:
        {
            
format(SzMessages191"^1%s ^4[CONFIG] Nivel: %d ^3%s : ^3%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
7:
        {
            
format(SzMessages191"^1%s ^4[VIP] Nivel: %d ^3%s : ^1%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
8:
        {
            
format(SzMessages191"^1%s ^4Nivel: %d ^3%s : ^1%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
    } 


    for(new 
1<= SzMaxPlayersi++)
    {
        if(!
is_user_connected(i)) {
            continue;
        }

        if(
SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))
        {
            
message_begin(MSG_ONEget_user_msgid("SayText"), {000}, i);
            
write_byte(id);
            
write_string(SzMessages);
            
message_end();
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
hook_say_team(id)
{
    new 
SzMessages[192], SzName[32]
    new 
SzAlive is_user_alive(id)

    
read_args(SzMessages191)
    
remove_quotes(SzMessages)
    
get_user_name(idSzName31)

    new 
Admin 0iFlags get_user_flags(id

    if(
iFlags ADMIN_IMMUNITY) { // as flags que cada tag vai ter !!  
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_H) {
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_G) {
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_F) {
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_E) { 
        
Admin 
    
}
    else if(
iFlags ADMIN_LEVEL_D) {
        
Admin 
    
}
    else if(
iFlags ADMIN_RESERVATION) {
        
Admin 
    
}
    else if(
iFlags ADMIN_USER) {
        
Admin 
    
}

    if(!
is_valid_msg(SzMessages)) {
        return 
PLUGIN_CONTINUE;
    }

    switch(
Admin
    {
        case 
1:
        {
            
format(SzMessages191"^1%s(Equipa) ^4[FUNDADOR] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
2:
        {
            
format(SzMessages191"^1%s(Equipa) ^4[LEADER] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
3:
        {
            
format(SzMessages191"^1%s(Equipa) ^4[ADMIN] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
4:
        {
            
format(SzMessages191"^1%s(Equipa) ^4[MOD.GERAL] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
5:
        {
            
format(SzMessages191"^1%s(Equipa) ^4[MOD] Nivel: %d ^3%s : ^4%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
6:
        {
            
format(SzMessages191"^1%s(Equipa) ^4[CONFIG] Nivel: %d ^3%s : ^3%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
7:
        {
            
format(SzMessages191"^1%s(Equipa) ^4[VIP] Nivel: %d ^3%s : ^1%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
        case 
8:
        {
            
format(SzMessages191"^1%s(Equipa) ^4Nivel: %d ^3%s : ^1%s"SzAlive "" "*Morto*"PLEVEL[id], SzNameSzMessages)
        }
    } 


    for(new 
1<= SzMaxPlayersi++)
    {
        if(!
is_user_connected(i)) {
            continue;
        }        

        if(
SzAlive && is_user_alive(i) || !SzAlive && !is_user_alive(i))
        {
            
message_begin(MSG_ONEget_user_msgid("SayText"), {000}, i);
            
write_byte(id);
            
write_string(SzMessages);
            
message_end();
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
MsgDuplicate(id) { 
    return 
PLUGIN_HANDLED
}

public 
client_connectid 

    
PXPid ] = 
    LoadData
id 


public 
client_disconnectid 

    
SaveDataid 
    
PXPid ] = 
    PLEVEL
id ] = 
    PKS
id ] = 


public 
EventPlayerSpawnid 

    new 
health 
    
new newhealth 
    
new money 
    
new newmoney 
    
new armor 
    
new newarmor 

    money 
cs_get_user_moneyid 
    
newmoney money + (PLEVELid ] * 100
    
cs_set_user_moneyidnewmoney

    if( 
PLEVELid ] <= 50 
    { 
        
health get_user_healthid 
        
newhealth health + (PLEVELid ]) 
        
set_user_healthidnewhealth 
    } 
    else 
    { 
        
health get_user_healthid 
        
newhealth 150 

        armor 
get_user_armorid 
        
newarmor armor + ((PLEVELid ]) - 50
        
set_user_armoridnewarmor 
        
set_user_healthidnewhealth 
    } 


public 
EventDeathMsg() 

    new 
killer read_data
    new 
victim read_data
    new 
headshot read_data
    new 
xp 
    
new hs 

    
if(PLEVELkiller ] > PLEVELvictim ]) 
    { 
        
xp 
    
}

    if(
PLEVELkiller ] < PLEVELvictim ]) 
    { 
        
xp 
    


    if(
PLEVELkiller ] == PLEVELvictim ]) 
    { 
        
xp 
    


    
PKSvictim ] = 

    
if( victim == killer 
    { 
        return 
PLUGIN_CONTINUE 
    


    if(
headshot
    { 
        
xp xp 
        hs 

    


    if(
PKSkiller ] < 10
    { 
        
PKSkiller ]++ 
    } 

    
xp xp PKSkiller 

    
add_xpkillerxphs 
    
check_levelkiller 

    new 
Text100 
    
formatex(Text,191,"Morreste!"
    
MakeTutor(victim,Text,RED,3.0
    return 
PLUGIN_CONTINUE 


public 
add_xpidxphs 

    new 
newlevel LEVELS[PLEVELid ]]-PXPid 

    
PXPid ] = PXPid ] + xp 

    
if(hs
    { 
        new 
Text100 
        
formatex(Text,191,"HEADSHOT! Ganhaste %d XP! ^nMataste %d seguidos^nFaltam %d XP para o Proximo Nivel!"xpPKSid ], newlevel
        
MakeTutor(id,Text,GREEN,3.0
    } 
    else 
    { 
        new 
Text100 
        
formatex(Text,191,"Ganhaste %d XP! ^nMataste %d seguidos^nFaltam %d XP para o Proximo Nivel!"xpPKSid ], newlevel
        
MakeTutor(id,Text,GREEN,3.0
    } 


public 
check_levelid 

    if(
PXPid ] >= LEVELS[PLEVELid ]]) 
    { 
        
PLEVELid ]++ 
        new 
Text100 
        
formatex(Text,191,"Estas no Nivel %d"PLEVELid ]) 
        
MakeTutor(id,Text,GREEN,5.0
        
ColorChat(idTEAM_COLOR"^04[ PFA | SURF ]^03 Estas no Nivel:^04 %d"PLEVELid ]) 
    } 


public 
printWeaponsid 

    new 
Text255 
    
formatex(Text,191
    
"Nivel 10: Faca Dourada^nNivel 20: AK-47 + M4A1 Dourada^nNivel 30: Deagle Dourada^nNivel 40: Shotgun Dourada^nNivel 50: Granada NAZI^nNivel 70: Glock + USP Dourada^nNivel 100: AWP^n^nTodas as Armas tiram o Dobro do Dano."
    
MakeTutor(id,Text,YELLOW,7.0


public 
printInfoid 

    new 
Text255 
    
formatex(Text,191
    
"Como Funciona o XP do Surf?^n-Ganhas armas douradas/especiais num certo nivel.^n^nSo Isso?^n-Nao, Tambem ganhas 1 HP por nivel e mais dinheiro!"
    
MakeTutor(id,Text,YELLOW,7.0


public 
printXpid 

    new 
Text100 
    
formatex(Text,191,"O Teu XP: %d"PXPid ]) 
    
MakeTutor(id,Text,YELLOW,3.0
    
ColorChat(idTEAM_COLOR"^04[ PFA | SURF ] ^03O Teu XP:^04 %d"PXPid ]) 


public 
printNewLevelid 

    new 
newlevel LEVELS[PLEVELid ]]-PXPid 
    new 
Text100 
    
formatex(Text,191,"Faltam-te para o Priximo Nivel: %d XP"newlevel
    
MakeTutor(id,Text,YELLOW,3.0
    
ColorChat(idTEAM_COLOR"^04[ PFA | SURF ] ^03Faltam-te para o Proximo Nivel:^04 %d ^03XP"newlevel


public 
printLevelid 

    new 
Text100 
    
formatex(Text,191,"Estas no nivel %d"PLEVELid ]) 
    
MakeTutor(id,Text,YELLOW,3.0
    
ColorChat(idTEAM_COLOR"^04[ PFA | SURF ] ^03Estas no Nivel:^04 %d"PLEVELid ]) 


new const 
g_savedata[] = "xp"

public SaveData(id

    new 
AuthID[35
    
get_user_authid(id,AuthID,34

    new 
vaultkey[64],vaultdata[256
    
format(vaultkey,63,"%s-Mod",AuthID
    
format(vaultdata,255,"%i %i",PXP[id],PLEVEL[id]) 

    
fvault_set_data(g_savedata,vaultkey,vaultdata

public 
LoadData(id

    new 
AuthID[35], playerxp[32], playerlevel[32
    
get_user_authid(id,AuthID,34

    new 
vaultkey[64],vaultdata[256
    
format(vaultkey,63,"%s-Mod",AuthID

    
fvault_get_data(g_savedata,vaultkey,vaultdatacharsmax(vaultdata)) 

    
parse(vaultdataplayerxpcharsmax(playerxp), playerlevelcharsmax(playerlevel)) 

    
PXP[id] = str_to_num(playerxp
    
PLEVEL[id] = str_to_num(playerlevel
}

MakeTutor(id,Text[],Color,Float:Time 0.0


    
client_cmdid"spk %s"MSOUND 

    if(
is_user_connectedid )) 
    { 
        
message_begin(MSG_ONE_UNRELIABLE,g_MsgTutor,_,id
        
write_string(Text
        
write_byte(0
        
write_short(0
        
write_short(0
        
write_short(1<<Color
        
message_end() 
    } 
    if(
Time != 0.0
    { 

        if( 
task_existsid TASK_TUT ) ) 
        { 
            
remove_taskid TASK_TUT 
        } 
        
set_task(Time,"RemoveTutor",id TASK_TUT
    } 

public 
RemoveTutor(taskID

    new 
id taskID TASK_TUT 
    message_begin
(MSG_ALL,g_MsgTutClose,_,id
    
message_end() 

public 
ev_CurWeapon(id

    if(!
is_user_connected(id) || !is_user_alive(id))  
    { 
        return 
PLUGIN_HANDLED
    } 
    new 
Weapon_Id read_data(2

    for(new 
1sizeof Stuffi++)
    {
        if(
Weapon_Id == Stuff[i][_csw] && PLEVEL[id] >= Stuff[i][_xp])
        
set_pev(idpev_viewmodel2Stuff[i][_model])

    }
    return 
PLUGIN_CONTINUE


public 
fwHamTakeDamage(victiminflictorattackerFloat:damagedamagebits

    for(new 
1sizeof Stuffi++)
    {
        if(
get_user_weapon(attacker) == Stuff[i][_csw] && PLEVELattacker ] >= Stuff[i][_xp])
        {
            
SetHamParamFloat(4damage 2.0)
            return 
HAM_HANDLED
        
}
    }

    return 
HAM_IGNORED  
}  

bool:is_valid_msg(const SzMessages[])
{
    if( 
SzMessages[0] == '@'
    
|| !strlen(SzMessages)){ 
        return 
false
    }
    return 
true;

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 10:19.


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