Why Will This Teleport Not Work? (maybe paste the correct here)
#1

I need a teleport setup in this format:

Код:
// Command: /dive3
	if(strcmp(cmdtext, "/dive3", true)==0)
	{
 	new vehicleid = GetPlayerVehicleID(playerid);
 	new State = GetPlayerState(playerid);
 	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
 	{
  return SetVehiclePos(vehicleid,2064.3633,2442.2717,165.6172),
  GameTextForPlayer(playerid, "~w~Dive Jump ~G~3", 5000, 5);
 	}
 	SetPlayerPos(playerid,2064.3633,2442.2717,165.6172);
 	GameTextForPlayer(playerid, "~w~Dive Jump ~G~3", 5000, 5);
	return 1;
}

but the tele I need to add is in this format


Код:
if (!strcmp("/skroad", cmdtext, true))
	{
	 	SetPlayerPosWithVehicle(playerid, 3893.8152, -1623.4252, 1442.5, 360, cmdtext);
		return 1;
when I paste the location on the top one I get

[
Код:
sub]C:\PROGRA~1\SA-MPS~1\FILTER~1\xObjectz.pwn(489) : error 017: undefined symbol "SetPlayerPosWithVehicle"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
is SetPlayerPosWithVheicle in a include? on the other file I got this tele from is (INC):

Код:
#include <a_samp>
#include <dini>
#include <dudb>

Reply
#2

anyone?
Reply
#3

I see your using a generator judging by your indentation, here is how it should look.

Код:
  if(strcmp(cmdtext,"/dive3",true)==0)
	{
		new vehicleid = GetPlayerVehicleID(playerid);
		new State = GetPlayerState(playerid);
		if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
		{
			GameTextForPlayer(playerid, "~w~Dive Jump ~G~3", 5000, 5);
			return SetVehiclePos(vehicleid,2064.3633,2442.2717,165.6172);
		}
		SetPlayerPos(playerid,2064.3633,2442.2717,165.6172);
		GameTextForPlayer(playerid, "~w~Dive Jump ~G~3", 5000, 5);
		return 1;
	}
If hes on foot it teleports him, if hes in a vehicle it teleports him nd vehicle, if you want it so you can ONLY teleport in a vehilce, set it up like this.


Код:
  if(strcmp(cmdtext,"/skroad",true)==0)
	{
		new vehicleid = GetPlayerVehicleID(playerid);
		new State = GetPlayerState(playerid);
		if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
		{
			GameTextForPlayer(playerid, "SKROAD", 5000, 5);
			return SetVehiclePos(vehicleid,3893.8152, -1623.4252, 1442.5);
		}
		GameTextForPlayer(playerid, "You are not in a vehicle!", 5000, 5);
		return 1;
	}
Hope that explains it.
Reply
#4

Thanks it did
Reply
#5

this is an undone generator by me it makes a teleport in seconds with car/without car or however you like it (full version probably won't be released):
http://www.fileflyer.com/view/lcUPZAR
enjoy...
Reply
#6

i generally prefer to write my own teleports since they need to work in certain ways. and it's pretty easy.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)