Please, some quick help
#1

Okay my ultimate goal is to make a /track command that puts a beacon on the map at the players location that updates and follows them as they update, but for some reason it doesn't even create a beacon, heres what I got so far, I got a /trackoff that disables checkpoints

Код:
	if (strcmp("/track", cmdtext, true, 10) == 0)
	{
		if(PlayerInfo[playerid][pMember] != 8) return SendClientMessage(playerid, COLOR_GREY, "* You must be a hitman to use this command.");
		{
		    tmp = strtok(cmdtext, idx);
		    if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /track [playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(giveplayerid != INVALID_PLAYER_ID)
			{
				GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				new Float:X,Float:Y,Float:Z;
				GetPlayerPos(giveplayerid, X,Y,Z);
				SetPlayerCheckpoint(playerid, X,Y,Z, 6);
			}
		}
	}
Reply
#2

does it print any errors while compiling it?
Reply
#3

No it doesn't thats why I don't understand, but I need it to follow them too, and I'm not sure how rofl
Reply
#4

wait, you want to set marker on someones position, i mean i read the code and that is what i understand
Reply
#5

change this line giveplayerid = ReturnUser(tmp); to giveplayerid = strval(tmp);
Reply
#6

Still don't work
Reply
#7

try this, because size mus be float

SetPlayerCheckpoint(playerid, X,Y,Z, 6.0);
Reply
#8

still nope see likewtfhax./
Reply
#9

are there any commands or its only this, cus you are using cmdtext, and i think you should cmd, but i will try now to script it
Reply
#10

You are setting the checkpoint to the one that typed the command. Change it to "giveplayerid"
Reply


Forum Jump:


Users browsing this thread: