Updated to include additional protection for PDATA.

This commit is contained in:
Twilight Suzuka
2006-01-03 21:48:59 +00:00
parent 60716cd346
commit c9e84c563d
3 changed files with 18 additions and 2 deletions

View File

@ -31,6 +31,11 @@ static cell AMX_NATIVE_CALL get_user_level(AMX *amx,cell *params)
static cell AMX_NATIVE_CALL set_user_level(AMX *amx,cell *params)
{
if(GetUserLevel(params[0]) > params[2])
{
MF_LogError(amx,AMX_ERR_NATIVE,"Must set to a level higher than current one!");
return 0;
}
SetUserLevel(params[1], params[2] );
return 1;
}