help with pos teles -
billyho - 19.03.2009
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
Re: help with pos teles -
MenaceX^ - 19.03.2009
Put this in OnPlayerCommandText. It's a command, not a class.
Re: help with pos teles -
56avenue - 19.03.2009
Код:
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.
Re: help with pos teles -
billyho - 19.03.2009
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;
Re: help with pos teles -
mascii - 19.03.2009
Just search for a teleport generator, then you use, see the result, and learn
Re: help with pos teles -
billyho - 19.03.2009
thirs no teleport generator
Re: help with pos teles -
Jack_Fox - 19.03.2009
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;
}
Re: help with pos teles -
Egypt1123 - 23.09.2009
if you still stuck go to
http://wiki.sa-mp.com and search for "SetPlayerPos"
hope this helps =)
Re: help with pos teles -
virspector - 23.09.2009
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!