SetPlayerSkillLevel
#1

Please add function GetPlayerSkillLevel(playerid, skill, level)
Reply
#2

It's scriptable.
Reply
#3

It may be scriptable, but for anticheat, you will need a function for getting that current skill level.
Reply
#4

The Skill level is server side and not client side, therefore any cheats changing it wont have any effect.
Reply
#5

Quote:
Originally Posted by dugi
The Skill level is server side and not client side, therefore any cheats changing it wont have any effect.
Sorry (/me runs) but that's bs. Offcourse it has an effect client side, there are probably cheats available for it already. The server must probably just sends data which the client reads and updates accordingly. How do you think skill levels occured in singleplayer?
Reply
#6

Quote:
Originally Posted by Seif_ [adream-rp.com
]
Quote:
Originally Posted by Jay_
Quote:
Originally Posted by dugi
The Skill level is server side and not client side, therefore any cheats changing it wont have any effect.
Sorry (/me runs) but that's bs. Offcourse it has an effect client side, there are probably cheats available for it already. The server must probably just sends data which the client reads and updates accordingly. How do you think skill levels occured in singleplayer?
That cheat most likely just changes it for the client and not for everyone in the server.
Is the skill level replicated to other clients?
Reply
#7

Quote:
Originally Posted by Jay_
Quote:
Originally Posted by dugi
The Skill level is server side and not client side, therefore any cheats changing it wont have any effect.
Sorry (/me runs) but that's bs. Offcourse it has an effect client side, there are probably cheats available for it already. The server must probably just sends data which the client reads and updates accordingly. How do you think skill levels occured in singleplayer?
It might have an effect only on the screen of the person who used a cheat to change the skill level, but it won't be replicated to other clients however.
Reply
#8

Quote:
Originally Posted by Jay_
Quote:
Originally Posted by dugi
The Skill level is server side and not client side, therefore any cheats changing it wont have any effect.
Sorry (/me runs) but that's bs. Offcourse it has an effect client side, there are probably cheats available for it already. The server must probably just sends data which the client reads and updates accordingly. How do you think skill levels occured in singleplayer?
Yes "client side" so the server and the rest of the players (not your client) will be running the old value. I don't know how this effects hit messages or whatever but it should get the hit message, get the weapon, get the skill, do the math of the impact force based on your weapon and skill and then broadcast it so client side modifications of whatever values won't matter.

Anyway some code incase anyone wants it (untested but should be fine):

pawn Код:
//global
new
  gSkillLevel[ MAX_PLAYERS ][ 11 ];

//set (you could wrap this as a define)
gSkillLevel[ playerid ][ skillid ] = level;
SetPlayerSkillLevel( playerid, skillid, level );

//get
#define GetPlayerSkillLevel(%1,%2)  gSkillLevel[ %1 ][ %2 ]
//or
GetPlayerSkillLevel( playerid, skillid ) //connection and index protection (OOB)
{
  if ( IsPlayerConnected( playerid ) )
  {
    if ( skillid < 11 && skillid > -1 ) return gSkillLevel[ playerid ][ skillid ];
  }
  return 0;
}
pawn Код:
printf( "skill %d is %d", skillid, GetPlayerSkillLevel( playerid, skillid ) );
Just like money it's easy to track.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)