GetPlayerWantedLevel does not work

Hey,

My goal is when the player leaves the server if he has more than one star not save the player in the database.

The problem is that this piece of code “GetPlayerWantedLevel(xPlayer)” always returns wanted level to 0.

Sorry for my english and thank you.

Is xPlayer the player’s ID? I assume not just by looking at the rest of the code.

This piece of code is part of the es_extended function.lua script xPlayer returns table: 0000023C292C2AD0

use xPlayer.source

does GetPlayerWantedLevel(PlayerId()) also give you 0 ?

xPlayer.source works thanks

You’re welcome, don’t forget to set as resolved