Hi all...I made a little command thats going to help me build my server so i wanted to shere it.
Here it is for all the lazy ones
Code :public OnPlayerChat(ID, message{}) { new str{MAX_CHAT_LENGTH}; if(message{0} == '/' && strlen(message)>1) { new delim = strfind(message," "), str{MAX_CHAT_LENGTH}, params{MAX_MESSAGE_LENGTH}, len = strlen(message); strmid(str,message,1,delim==-1?len:delim); if(delim>1) strmid(params,message,delim+1,len); if(!strcmp(str,"getpos")) { new Float:x, Float:y, Float:z; GetPos(ID, x, y, z); strformat(str,sizeof(str),true,"You are at X:%f Y:%f Z:%f", x, y, z,message); ChatMessage(0,str); return 0; } } }
Thx to Xolitude and NeoPhoenix for command script!