Teleporting problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Teleporting problem (
/showthread.php?tid=391311)
Teleporting problem -
Sam5513 - 10.11.2012
Hey guys. I wanted to make a command which would move me slightly north(for getting past obstacles) but whenever I use it, I move like super forward and spawn at palomino. I dont understand why as I add the y value just by a small ammount and the z value too.
Please, tell me whats wrong. Thanks
Код:
CMD:north(playerid,params[])
{
if(restrict[playerid]==1)
{
SendClientMessage(playerid,COLOR_RED,"Access denied.");
return 1;
}
new float:x,float:y,float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y+0.1,z+0.5);
return 1;
}
Re: Teleporting problem -
Plovix - 10.11.2012
Replace:
PHP код:
new float:x,float:y,float:z;
With:
PHP код:
new Float:x,Float:y,Float:z;
Re: Teleporting problem -
Sam5513 - 10.11.2012
Works perfectly. Thanks
Re: Teleporting problem -
Plovix - 10.11.2012
Quote:
Originally Posted by Sam5513
Works perfectly. Thanks 
|
NP,if you have ANY problem,just contact me

If I help you,then +rep me