Log in

View Full Version : Easy Command to get your position



KingIvan
01-08-2013, 11:32 PM
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 ;)




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!

Xolitude
01-09-2013, 04:12 AM
Command script, Me and NeoPhoenix. Mostly Neo. And nice script :D I may use this in time to come.

KingIvan
01-09-2013, 07:28 AM
Ty and sry i forgot your names xD

Volumed
01-09-2013, 07:37 AM
Ty and sry i forgot your names xD

Nobody blames you, I wish I was able to forget there name's sometimes.

KingIvan
01-09-2013, 03:38 PM
hahahahah:D

Xolitude
01-09-2013, 07:37 PM
Volumed, why do you hurt me so :(

Volumed
01-09-2013, 07:46 PM
https://www.gezinspiratie.nl/wp-content/uploads/I-love-you.jpg

NO HOMO