Tele!
#5

Quote:
Originally Posted by bgedition
Посмотреть сообщение
EDIT:
Код:
new Goto[MAX_PLAYERS] = 1;
CMD:go(playerid, params[]) {
	new TargetID, Float:X, Float:Y, Float:Z, Float:A;
	if(sscanf(params, "u", TargetID)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE:/go (playerid) to teleport to that player");
	if(Goto[TargetID] == 1) {
		GetPlayerPos(TargetID, X, Y, Z);
		GetPlayerFacingAngle(TarggetID, A);
		SetPlayerPos(playerid, X + 1, Y, Z);
		SetPlayerFacingAngle(playerid, A + 180);
	} else if(Goto[TargetID] == 0) {
	    SendClientMessage(playerid, 0xFF0000FF, "That player disabled teleports to him!");
	}
	return 1;
}



CMD:gos(playerid, params[]) {
	if(Goto[playerid] == 0) {
	    Goto[playerid] = 1;
	    SendClientMessage(playerid, 0xFF0000FF, "You have enabled player from teleporting to you!");
	} else {
	    Goto[playerid] = 0;
	    SendClientMessage(playerid, 0xFF0000FF, "You have disabled player from teleporting to you!");
	}
	return 1;
}
try now
Now the player will be teleported to the other player face to face
And "Goto" must to be for each player.
You defined goto with MAX_PLAYERS, what thought come into mind dont you think it will disable command for playerid that uses it?
Reply


Messages In This Thread
Tele! - by ironmen - 08.06.2015, 07:27
Re: Tele! - by GTLS - 08.06.2015, 08:46
Re: Tele! - by bgedition - 08.06.2015, 08:52
Re: Tele! - by ironmen - 08.06.2015, 08:55
Re: Tele! - by GTLS - 08.06.2015, 08:58
Re: Tele! - by bgedition - 08.06.2015, 09:01
Re: Tele! - by GTLS - 08.06.2015, 09:03
Re: Tele! - by ironmen - 08.06.2015, 09:20
Re: Tele! - by GTLS - 08.06.2015, 09:22
Re: Tele! - by ironmen - 08.06.2015, 09:23

Forum Jump:


Users browsing this thread: 1 Guest(s)