23.09.2015, 11:51
So, in the old thread I understood about defining player vars with dot (e.g. Player.Name instead of Player[playerid][Name]). A new question is about defining functions...
For example, we have a standard function, standard callback and one custom function:
I want to write it like (in some place I've also define 'event' (public) and 'player' (playerid)):
It will be good if someone explain me how to make define like that. I mean.. em.. something like that:
Thanks.
For example, we have a standard function, standard callback and one custom function:
Код:
public OnPlayerConnect(playerid) { SendClientMessage(playerid, -1, "Hello!"); //it will be our standard function } SetPlayerSomeStuff(playerid) //custom function { SomeFunc(); SomeFuncElse(); }
Код:
event player.connect() { player.sendMessage(-1, "Hello!"); } player.setSomeStuff() { SomeFunc(); SomeFuncElse(); }
Код:
#define %0.connect() OnPlayerConnect(%0)