help with pos teles
#1

Hi guys bit stuck here, i want to add a tele /tankdm i have the pos it is AddPlayerClass(105,2320.4558,568.2838,7.7802,6.660 4,0,0,0,0,0,0); //
how can i add this to my script


thanks
Reply
#2

Put this in OnPlayerCommandText. It's a command, not a class.
Reply
#3

Код:
 if(strcmp(cmd,"/tankdm",true) == 0) {
 SetPlayerPos(playerid,2320.4558,568.2838,7.7802);
 SetPlayerFacingAngle(playerid,6.6604);
 SetPlayerInterior(playerid,0);
 return 1;
 }
Simple stuff.
Reply
#4

how can i change this to one below with /tankdm ive tried one above wont work so i copy paste wot looks like in script AddPlayerClass(105,2320.4558,568.2838,7.7802,6.660 4,0,0,0,0,0,0); //


if (!strcmp("/bigjump", cmdtext, true))
{
SetPlayerPosWithVehicle(playerid, -645.1850, 2311.9236, 135.0301, 6.2667, cmdtext);
return 1;

Reply
#5

Just search for a teleport generator, then you use, see the result, and learn
Reply
#6

thirs no teleport generator
Reply
#7

This will teleport you, if you are in a vehicle or not...
Код:
	if(strcmp(cmd, "/tankdm", true) == 0)
	{
		if (GetPlayerState(playerid) == 2)
		{
			new tmpcar = GetPlayerVehicleID(playerid);
			SetVehiclePos(tmpcar, 2320.4558,568.2838,7.7802);
		}
		else
		{
			SetPlayerPos(playerid, 2320.4558,568.2838,7.7802);
		}
		SendClientMessage(playerid, COLOR_GRAD1, "  You have been teleported !");
		SetPlayerInterior(playerid,0);
		return 1;
	}
Reply
#8

if you still stuck go to http://wiki.sa-mp.com and search for "SetPlayerPos"


hope this helps =)
Reply
#9

OnPlayerCommandText(playerid,cmdtext[])
{

if(!strcmp("/tankdm",cmdtext,true))
{
SetPlayerPos(playerid,2320.4558,568.2838,7.7802)
return 1;
}


}

SetPlayerPos is a function that like this:

SetPlayerPos(#idofplayer#,x,y,z);

And, AddPlayerClass is like this:

AddPlayerClass(#skinid#,x,y,z,#theangle(where the player look to)#,weapon1,ammo_of_weapon1,weapon2,ammo_of_weapo n2,weapon3,ammo_of_weapon3);

And, to help u easier to tele, i am going to give u an example.

U have a script like this:

AddPlayerClass(2,10.5423,20.3847,11.203948,0,32,999,0,0,0,0);

Now, we have to copy the underlined texts, and put it into this:

SetPlayerPos(playerid,10.5423,20.3847,11.203948);

Sooooo simple, isn't it?

Hopez helped u!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)