[+1 Rep] Getting Player Location
#1

I did not find anything at all regarding this. How do I find a player's map location? For example in SF Garcia, Juniper Hollow, etc?

I need a function that will just return the player's area based on the map.
Reply
#2

im not sure what you mean but i think this will help you:
Код:
CMD:goto(playerid,params[]) {
    if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) {
	    if(isnull(params)) return Inter_SendClientMessage(playerid,red,"USAGE: /goto [playerid]");
	    new player1, string[128];
		if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
	   	else player1 = strval(params);
	 	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
		//	SendCommandToAdmins(playerid,"GOTO");
			new Float:x, Float:y, Float:z;
			GetPlayerPos(player1,x,y,z);
			TogglePlayerControllable(playerid,0);
			format(string,sizeof(string),"You have teleported to \"%s\"", pName(player1));
			TimedTele(playerid, string, x+3, y, z, GetPlayerInterior(player1), GetPlayerVirtualWorld(player1), 1);
			return Inter_SendClientMessage(playerid,blue,string);
		} else return Inter_SendClientMessage(playerid, red, "Player is not connected or is yourself");
	} else return Inter_SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Reply
#3

He didn't asked for goto command. Use your own stock functions and GangZones it could be helpful for you.
Reply
#4

I know what he means. He wants a function that returns the name of the area where a player is in.
I know there was an include file with an array containing all the zone names and their area coords and a function returning the areaof a player.
Anyway it's stupid that you write rep+ because I don't think that a newbie with 0 reputation can give any.
Reply
#5

https://sampforum.blast.hk/showthread.php?tid=27598
Reply
#6

Quote:
Originally Posted by eesh
Посмотреть сообщение
I mean This include
Reply
#7

Lol i didnt want the rep. I just have something that i belived that he maybe could use.
Im sorry if that annoying you.
Reply
#8

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
I know what he means. He wants a function that returns the name of the area where a player is in.
I know there was an include file with an array containing all the zone names and their area coords and a function returning the areaof a player.
Anyway it's stupid that you write rep+ because I don't think that a newbie with 0 reputation can give any.
Oh I'm sorry, I thought anyone can give rep+ despite their own rep.

Thanks for the include EESH
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)