how to redefine a define?
#10

Its impossible indeed (as far as I know) to change it ingame. If you wanna change such thing, make a global variable. eg. the COLOR_CUSTOM:

pawn Код:
#include <a_samp>
#include <zcmd>

new COLOR_CUSTOM = 0xFF0000AA; //Red

CMD:current_color(playerid, params[])
    return SendClientMessage(playerid, COLOR_CUSTOM, "This is the current custom color!");

CMD:set_color(playerid, params[])
    return isnull(params) ? SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /set_color [color]") : CUSTOM_COLOR = params[0]; //Not sure if that'll work :P
Something similar to that.
The only way to change a DEFINE is, as said above with #undef and again #define
pawn Код:
#define COLOR_CUSTOM 0xFF0000AA //Red
#undef COLOR_CUSTOM
#define COLOR_CUSTOM 0x00FF00AA //Green
Reply


Messages In This Thread
how to redefine a define? - by fissekarl - 06.06.2011, 14:16
Re: how to redefine a define? - by KoczkaHUN - 06.06.2011, 14:21
Re: how to redefine a define? - by [DM]Kane - 06.06.2011, 14:21
Re: how to redefine a define? - by fissekarl - 06.06.2011, 14:25
Re: how to redefine a define? - by KoczkaHUN - 06.06.2011, 14:26
Re: how to redefine a define? - by Tee - 06.06.2011, 14:32
Re: how to redefine a define? - by fissekarl - 06.06.2011, 14:35
Re: how to redefine a define? - by Tee - 06.06.2011, 14:36
Re: how to redefine a define? - by sim_sima - 06.06.2011, 14:39
Re: how to redefine a define? - by Kwarde - 06.06.2011, 14:39

Forum Jump:


Users browsing this thread: 2 Guest(s)