• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Do something on map enter

Darthye

Enthusiast
As title says...

Code:
#include "ScriptPCH.h"

class OnMapEnter: public PlayerScript
{
    public:
        OnMapEnter() : PlayerScript("OnMapEnter") {}

    void OnPlayerEnterMap(Map* map, Player* player)
    {
    	if (player->GetMapId() == 100)
    	{
		player->AddItem(1337, 1);
		//add stuff here
    	}
    }
};

void AddSC_OnMapEnter()
{
    new OnMapEnter();
}

This script will add you the item 1337 when entering the map 100 (just examples).
Pretty simple to edit and might be useful.

If you want more scripts like this (like onpvpkill, onlogin, etc...) just tell me and i will make/post them :)
 
Top