O Ilusionista
Captain 100K
Guys, I want to make to draw some strings on the select screen based on which map the player has for now.
I've tried to use this code inside a ondrawscript but it works only during stages - so I assume ondrawscripts doesn't works on outside stages.
Then I moved to updated.c using "in_selectscreen" check.
It works, but there is a part which doesn't works and I can't understand why:
Why the if(p1) part fails?
msmalik681 Kratus Damon Caskey can any of you guys give me a hand here?
I've tried to use this code inside a ondrawscript but it works only during stages - so I assume ondrawscripts doesn't works on outside stages.
Then I moved to updated.c using "in_selectscreen" check.
It works, but there is a part which doesn't works and I can't understand why:
Code:
if(openborvariant("in_selectscreen"))
{
int P1 = getplayerproperty(0, "entity");
char Tname = getplayerproperty(P1, "name");
drawstring(30,50,0,Tname,1000); // works
drawstring(30,60,1,P1,1000); // return <VT_EMPTY>
if (P1){// this check fails and anything inside it isn't displayed
int Map = getentityproperty(P1, "map");
int x = getentityproperty(P1, "x");
int y = getentityproperty(P1, "y");
int z = getentityproperty(P1, "z");
char Tname = getentityproperty(P1, "defaultname");
drawstring(30,100,2,Tname,1000);
drawbox(120,100,100,10,1000,rgbcolor(0xFF,0xE0,0x03), 0);
drawstring(30,120,2,"P1 on the game",1000);
}
Why the if(p1) part fails?
msmalik681 Kratus Damon Caskey can any of you guys give me a hand here?