Displaying position?
#4

Quote:
Originally Posted by AF1-4-LIFE
Maybe you should make it like this:

Код:
//under
OnPlayerCommandText(playerid, cmdtext[])

  new string[256];

//then your code here
	if (strcmp("/mypos", cmdtext, true, 6) == 0) //should be 6 not 10
	{
  		new Float:x, Float:y, Float:z;
 		GetPlayerPos(playerid, x, y, z);
 		SendClientMessage(playerid, COLOR_REDTRANS, "Displaying position... Loaded...");
		format(string, sizeof(string), "Your position: %s, %s, %s.", x, y, z);
        SendClientMessage(playerid,COLOR_REDTRANS,string);
		return 1;
	}
And then do whatever you have to do...Cheers

AF1
No, use the one CAR made, although personally I would make it (strcmp("/mypos", cmdtext, true) == 0). Actually I wouldn't use strcmp, but whatever.
Reply


Messages In This Thread
Displaying position? - by jameskmonger - 11.11.2009, 19:26
Re: Displaying position? - by CAR - 11.11.2009, 19:36
Re: Displaying position? - by smoker08 - 11.11.2009, 19:39
Re: Displaying position? - by radhakr - 11.11.2009, 19:46
Re: Displaying position? - by smoker08 - 11.11.2009, 19:55
Re: Displaying position? - by Brendan_Thomson - 11.11.2009, 20:22
Re: Displaying position? - by radhakr - 11.11.2009, 20:50
Re: Displaying position? - by (.Aztec); - 11.11.2009, 20:53
Re: Displaying position? - by Daren_Jacobson - 11.11.2009, 21:07
Re: Displaying position? - by (.Aztec); - 11.11.2009, 21:09

Forum Jump:


Users browsing this thread: 3 Guest(s)