SA-MP Forums Archive
Help with a teleport command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with a teleport command (/showthread.php?tid=146645)



Help with a teleport command - BurnOutt - 08.05.2010

what's worng here ?

if(strcmp (cmdtext, "/ship", true)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SetPlayerPos(playerid,-2402.7239,1402.8665,7.3363);
SetVehiclePos(GetPlayerVehicleID(playerid),-2402.7239,1402.8665,7.3363);
GivePlayerWeapon(playerid, 31, 350);
GivePlayerWeapon(playerid, 25, 50);
GivePlayerWeapon(playerid, 29, 300);
SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
return 1;
}


Re: Help with a teleport command - westre - 08.05.2010

pawn Код:
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicle,-2402.7239,1402.8665,7.3363);



Re: Help with a teleport command - BurnOutt - 08.05.2010

can you write the command from the beginnging ?
the "giveplayerweapon" and sendclientmessage doesn't work...
can you rewrtite the commnad ?


Re: Help with a teleport command - [XST]O_x - 08.05.2010

Edit: NVM omg it didnt work :/
working on a new one sry

Edit 2:
pawn Код:
if(strcmp (cmdtext, "/ship", true)==0)
{
    new car;
    car = GetPlayerVehicleID(playerid);
    if(!IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(car,-2402.7239,1402.8665,7.3363);
    GivePlayerWeapon(playerid, 31, 350);
    GivePlayerWeapon(playerid, 25, 50);
    GivePlayerWeapon(playerid, 29, 300);
    SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
    }
    else
    {
    SetPlayerPos(playerid,-2402.7239,1402.8665,7.3363);
    GivePlayerWeapon(playerid, 31, 350);
    GivePlayerWeapon(playerid, 25, 50);
    GivePlayerWeapon(playerid, 29, 300);
    SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
    }
  return 1;
}
hope it works now


Re: Help with a teleport command - Jefff - 08.05.2010

Simply
Код:
if(!strcmp(cmdtext, "/ship", true))
{
	new car;
	car = GetPlayerVehicleID(playerid);
	if(!GetPlayerVehicleSeat(playerid)) SetVehiclePos(car,-2402.7239,1402.8665,7.3363);
	else SetPlayerPos(playerid,-2402.7239,1402.8665,7.3363);
 	GivePlayerWeapon(playerid, 31, 350);
 	GivePlayerWeapon(playerid, 25, 50);
 	GivePlayerWeapon(playerid, 29, 300);
 	SendClientMessage(playerid, COLOR_BLUE, "The area Made By BurnOut");
	return 1;
}