Member
|
09-11-2012
, 19:16
Re: Achievements
|
#141
|
Help please!
achievements2.0 good works in my server. I little changed the code (nominate version 2.03) I add 2 achievements, sniper and smg master.
in .sma
add the code in "enum _:g_iAchCount" (nearly line 100)
add the code in "new const g_iAchsMotd[g_iAchCount][] =" (nearly line 140)
add the code in "new const g_iAchsMaxPoints[g_iAchCount] =" (nearly line 170)
-this is detail1
in the weapon achievements codes i add some code (in detail2) and wrote the smg an sniper master achievement (in detail3)
in achievement.txt I add 2 line for the new achievements.
When client connect to the server, the client freeze and I see in the server console:skipping reconnect on *****, no pvPrivateData.
Whats wrong?
detail1:
Code:
enum _:g_iAchCount
{
CONNECTIONS,
HEAD_SHOTS,
DISTANCE_KILLED,
DISTANCE_WALKED,
BOMB,
PLANT_BOMB,
PLANT_BOMB_COUNT,
DEFUSED_BOMB,
TOTAL_KILLS,
PISTOL_MASTER,
RIFLE_MASTER,
SHOTGUN_MASTER,
SMG_MASTER,
SNIPER_MASTER,
SPRAY_N_PRAY,
MASTER_AT_ARMS,
PLAY_AROUND,
STAND_ALONE,
ONE_HP_HERO,
BAD_FRIEND,
URBAN_DESIGNER,
GRAFFITI,
AMMO_CONSERVATION,
FLY_AWAY,
RELOADER,
CAMP_FIRE,
HAT_TRICK,
COWBOY_DIPLOMACY,
TOTAL_DAMAGE
}
new const g_iAchsMotd[g_iAchCount][] =
{
"Ultimate Server Lover",
"Boom Head-Shot",
"Distance Killed",
"Distance Walked",
"OMFG that was close",
"Short Fuse",
"Boomala Boomala",
"Nothing Can Blow Up",
"God of War",
"Pistol Master",
"Rifle Master",
"Shotgun Master",
"Smg Master",
"Sniper Master",
"Spray and Pray",
"Master At Arms",
"Play Around",
"Stand Alone",
"1 Hp Hero",
"Bad Friend",
"Urban Designer",
"Graffiti Is My Second Name",
"Ammo Conservation",
"Fly Away",
"Reloader",
"Camp Fire",
"Hat Trick",
"Cowboy Diplomacy",
"You've Made Your Points"
}
new const g_iAchsMaxPoints[g_iAchCount] =
{
1000, // Connections
300, // Headshots
4, // distance killed
3, // distance walk
1, // bomb
1, // Plant bomb
100, // plant bomb count
400, // Defused Bomb
10000, // total kills
6, // Pistol master
10, // rifle Master
2, // shotgun master
5, // smg master
2, // sniper master
1, // spray and pray
25, // Master of Arms
60, // Play Around
15, // Stand Alone
1, // 1 Hp Hero
5, // Bad Friend
300, // Urban Designer
1, // Graffiti Is My Second Name
1, // Ammo Conservation
1, // Fly way
1000, // Reloader
1, // Camp Fire
1, // HatTrick
100, // Cowboy Diplomacy
50000 // Total Damage 50000 Damage points
}
detail2:
Code:
case CSW_SCOUT:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 800:
{
g_iAchLevel[ iKiller ][ SNIPER_MASTER ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned one of ^3'^1Sniper Master^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
case 1000:
{
g_iAchLevel[ iKiller ][ RIFLE_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Schmidt Scout Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_XM1014:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 200:
{
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
g_iAchLevel[ iKiller ][ SHOTGUN_MASTER ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Leone YG1265 Auto Shotgun Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_MAC10:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 500:
{
g_iAchLevel[ iKiller ][ SMG_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Ingram Mac-10 Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_AUG:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 500:
{
g_iAchLevel[ iKiller ][ RIFLE_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Bullpup Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
/*
case CSW_SMOKEGRENADE:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
}
}*/
case CSW_ELITE:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 100:
{
g_iAchLevel[ iKiller ][ PISTOL_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1.40 Dual Elites Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_FIVESEVEN:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 100:
{
g_iAchLevel[ iKiller ][ PISTOL_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1ES Five-Seven Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_UMP45:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 1000:
{
g_iAchLevel[ iKiller ][ SMG_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1KM UMP45 Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_SG550:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 500:
{
g_iAchLevel[ iKiller ][ RIFLE_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1D3/AU-1 Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_GALIL:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 500:
{
g_iAchLevel[ iKiller ][ RIFLE_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1IDF Defender Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_FAMAS:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 500:
{
g_iAchLevel[ iKiller ][ RIFLE_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Clarion 5.56 Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_USP:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 200:
{
g_iAchLevel[ iKiller ][ PISTOL_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1KM Tactical .45 Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_GLOCK18:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 200:
{
g_iAchLevel[ iKiller ][ PISTOL_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1.9×19 Sidearm Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_AWP:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 800:
{
g_iAchLevel[ iKiller ][ SNIPER_MASTER ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned one of^3'^1Sniper Master^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
case 1000:
{
g_iAchLevel[ iKiller ][ RIFLE_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Magnum Sniper Rifle Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_MP5NAVY:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 1000:
{
g_iAchLevel[ iKiller ][ SMG_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1KM Sub-Machine Gun Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_M249:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 500:
{
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1M249 Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_M3:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 200:
{
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
g_iAchLevel[ iKiller ][ SHOTGUN_MASTER ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Leone 12 Gauge Super Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_M4A1:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 1000:
{
g_iAchLevel[ iKiller ][ RIFLE_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Maverick M4A1 Carbine Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
case CSW_TMP:
{
switch( g_iPlayersKills[ iKiller ][ iWeaponID ] )
{
case 1000:
{
g_iAchLevel[ iKiller ][ SMG_MASTER ]++
g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ]++
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Schmidt Machine Pistol Expert^3'^4 achievement.", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
}
detail3:
Code:
switch( g_iAchLevel[ iKiller ][ SHOTGUN_MASTER ] )
{
case 2:
{
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Shotgun Master^3'^4 achievement!", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
switch( g_iAchLevel[ iKiller ][ SMG_MASTER ] )
{
case 5:
{
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Smg Master^3'^4 achievement!", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
switch( g_iAchLevel[ iKiller ][ SNIPER_MASTER ] )
{
case 2:
{
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Sniper Master^3'^4 achievement!", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
switch( g_iAchLevel[ iKiller ][ MASTER_AT_ARMS ] )
{
case 25:
{
Print( 0, "^4[Achievement]^3 %s^1 has earned ^3'^1Master at Arms^3'^4 achievement!", g_iKiller )
emit_sound( iKiller, CHAN_STATIC, g_szAchievementSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
}
}
__________________
|
|