05.04.2017, 13:46
(
Последний раз редактировалось grymtn; 05.04.2017 в 14:32.
Причина: Fixed id command.
)
Hello guys im trying to make a pm command using sscanf and zcmd but it doesnt turn out well
in game: /pm 0 a //still need help
Outcome: PM from 67: 97 //still need helpp
what is it with this 67 i cant see my own name and message seems like i wrote some numbers and they are not random if i write "b" instead of "a" it turns out to be 98.
My Code:
Any Help Is Appreciated.
in game: /pm 0 a //still need help
Outcome: PM from 67: 97 //still need helpp
what is it with this 67 i cant see my own name and message seems like i wrote some numbers and they are not random if i write "b" instead of "a" it turns out to be 98.
My Code:
Код:
CMD:pm(playerid, params[]) { new otherid,string[150],text,pname[24]; if (sscanf(params, "uc", otherid,text)) return SendClientMessage(playerid,-1,"Usage: /pm [playerid] [message]"); if(!IsPlayerConnected(otherid)) return SendClientMessage(playerid, COLOR_RED, "That PlayerID is not connected!"); GetPlayerName(playerid,pname,24); format(string,sizeof(string),"PM from %d: %d",pname,text); SendClientMessage(otherid,COLOR_YELLOW,string); return 1; }