onplayerkeystatechange
#1

Код:
	if( newkeys == KEY_SPRINT )
	{
    printf("IstrintiInformacija(%d);", playerid);
	TextDrawHideForPlayer(playerid, InformacijosDezute[playerid]);
	TextDrawDestroy(InformacijosDezute[playerid]);
	}
	return 1;
}
were is the problem pawn stop working(sublime text) after i put this -.-
Reply
#2

Код:
TextDrawHideForPlayer(playerid, InformacijosDezute[playerid]);
TextDrawDestroy(InformacijosDezute[playerid]);
A textdraw can't be playerid.
Reply
#3

Quote:
Originally Posted by Maximus0
Посмотреть сообщение
Код:
TextDrawHideForPlayer(playerid, InformacijosDezute[playerid]);
TextDrawDestroy(InformacijosDezute[playerid]);
A textdraw can't be playerid.
it can if you defined it like:
pawn Код:
new Text:Textdrawname[MAX_PLAYERS];
not sure why pawn is stopping but what I can tell you is:
You shouldn't check for keys like
pawn Код:
if(newkeys == KEY_SRPINT)
but use
pawn Код:
if(newkeys & KEY_SPRINT)
as this would detect if that key is any of the new keys.. If you check for == KEY_SPRINT it would mean ONLY that key, if you pressed another key (e.g. W) at the same time, it wouldn't work.
Reply
#4

Thanks for the info Sascha, I am just new to pawn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)