A question, when using insert does it shift everything over one entry? Or does it simply replace the value you've inserted into.
As I was using it this function is supposed to first insert a new string into the 0 entry of the client.messages array then delete the last entry if the last entry is over five. Isn't adding any new messages after I reach the 5 limit nor deleting them.
Any ideas?
PHP Code:
function onCreated()
{
setshape(1, 32, 32);
}
//#CLIENTSIDE
function onCreated()
{
setshape(1, 32, 32);
}
public function addPlayerNotification(message) {
echo(temp.message);
this.client.messages.insert(0, temp.message);
this.checkNotifications();
}
public function checkNotifications() {
if (this.client.messages.size() > 5)
{
this.deleteNotification();
}
}
public function deleteNotification() {
this.client.messages.delete(6);
}
public function updateNotifications() {
}