17.02.2016, 22:44
You're using CreateObject then DestroyPlayerObject... They're not related.
Use DestroyObject.
However, your code is going to run into problems. If more than one person uses this command, (In it's current state) it will lock the players object and won't destroy the first created object.
It's because this code only puts out one variable. Where you should use an array, set to MAX_PLAYERS, and use the playerid to specify that the players object e.g. DestroyObject(kardus[playerid]);
Use DestroyObject.
However, your code is going to run into problems. If more than one person uses this command, (In it's current state) it will lock the players object and won't destroy the first created object.
It's because this code only puts out one variable. Where you should use an array, set to MAX_PLAYERS, and use the playerid to specify that the players object e.g. DestroyObject(kardus[playerid]);