SA-MP Forums Archive
Teleports Fs need!!! - 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: Teleports Fs need!!! (/showthread.php?tid=266695)



Teleports Fs need!!! - IvancheBG - 05.07.2011

Hi i need a fs for teleports when you type /lv or /ls to teleport you in los santos and las venturas but with cars !!!


Re: Teleports Fs need!!! - ZachZ - 05.07.2011

Telports w/ Vehicle

Код:
if (strcmp("/ls", cmdtext, true, 10) == 0)
	{
	SetPlayerPos(playerid,259.3984,-1229.6013,73.7732);
	SetVehiclePos(vehicleid,259.3984,-1229.6013,73.7732)
	SendClientMessage(playerid, COLOR_GREEN,"Los Santos");
	return 1;
	}

if (strcmp("/lv", cmdtext, true, 10) == 0)
	{
	SetPlayerPos(playerid,1959.7703,1343.7137,15.3746);
	SetVehiclePos(vehicleid,1959.7703,1343.7137,15.3746);
	SendClientMessage(playerid, COLOR_GREEN,"Las Venturas");
	return 1;
	}



Re: Teleports Fs need!!! - Shadoww5 - 05.07.2011

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/ls"cmdtexttrue10) == 0)
    {
        if(!
IsPlayerInAnyVehicle(playerid)) { SetPlayerPos(playerid,259.3984,-1229.6013,73.7732); }
        else { 
SetVehiclePos(GetPlayerVehicleID(playerid),259.3984,-1229.6013,73.7732); }
        
SendClientMessage(playerid0xFFFF00FF,"Los Santos");
        return 
1;
    }
    if (
strcmp("/lv"cmdtexttrue10) == 0)
    {
        if(!
IsPlayerInAnyVehicle(playerid)) { SetPlayerPos(playerid,1959.7703,1343.7137,15.3746); }
        else { 
SetVehiclePos(vehicleid,1959.7703,1343.7137,15.3746); }
        
SendClientMessage(playerid0xFFFF00FF,"Las Venturas");
        return 
1;
    }
    return 
0;




Re: Teleports Fs need!!! - ZachZ - 06.07.2011

Also, I forgot the color define

Код:
#define COLOUR_GREEN 0x00BC00FF