24.01.2017, 20:48
Quote:
First of all you are doing all the stuff when sscanf stuff. It returns 0 if it succeeds so change
Код:
if (sscanf...) Код:
if (!sscanf...) so as sscanf fails the targetid is 0 or INVALID_PLAYER_ID I assume. Second you are using strcmp on params when you check the type, you must use it on the "type" string. Third you should also check if the target ID is invalid by checking if it's INVALID_PLAYER_ID. Also it's printing something else because targetid is an integer and you are trying to print it as a string, use %i or %d instead. Also you don't need 256 cells for messages because the max length of a client message is 144 as far as I know. You should even use less than 144. |