SA-MP Forums Archive
Back - 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: Back (/showthread.php?tid=346186)



Back - Menaz - 27.05.2012

Hello every One : 1st of all I Start scripting again after 5 months I forgot Some things In Pawno

when player teleport there Player auto get in car

Код:
if(strcmp(cmdtext, "/derby", true) == 0)
	{
		new name[MAX_PLAYER_NAME];
		new msg[128];
	    NormalTele(playerid, "Derby",  -1441.9851,937.9876,1036.3468,   279.2885,   -1424.1138,930.0392,1036.4016,   354.8884,   15);
        GetPlayerName(playerid,name,MAX_PLAYER_NAME);
	    format(msg, sizeof(msg), "TELE: %s has gone to The Derby (/derby)",name,playerid);
	    SendClientMessageToAll(COLOR_YELLOW,msg);
		return 1;
	}
I know I need to add like this PutPlayerInVehicle Car id is 504 BloodRingBanger

And Add like this :CreateVehicle(modelid, Float, Float:y, Float:z, Float:angle, color1, color2, respawn_delay)

But i dont get it all's Done but when i do that player pos changed : teleporting to nowhere !


Re: Back - TzAkS. - 27.05.2012

Код:
GetPlayerPos(playerid,x,y,z);
new carid;
carid = CreateVehicle(VehicleID,x,y,z,-1,-1,respawn_delay);
PutPlayerInVehicle(playerid, carid, 0)



Re: Back - Menaz - 27.05.2012

Set this on my command : i try but i got errors :

Here is player position
Quote:

-1500.1178,956.3409,1036.9805

Did u saw i said i forgot : pawno
Help please


AW: Re: Back - Nero_3D - 27.05.2012

pawn Код:
if(strcmp(cmdtext, "/derby", true) == 0) {
    new
        string[64], // \/ creates the vehicle (with the model 504) at the given position, facing north (0.0)
        vehicleid = CreateVehicle(504, -1500.1178, 956.3409, 1036.9805, 0.0, -1, -1, -1)
    ;
    // put the playerid inside the given vehicleid as driver (seatid 0)
    PutPlayerInVehicle(playerid, vehicleid, 0);
    // if the derby is in some interior you also need to set their interior
    // SetPlayerInterior(playerid, interiorid);
    // LinkVehicleToInterior(vehicleid, interiorid);
    GetPlayerName(playerid, string, MAX_PLAYER_NAME);
    format(string, sizeof string, "TELE: %s has gone to The Derby (/derby)", string);
    SendClientMessageToAll(COLOR_YELLOW, string);
    return true;
}



Re: Back - TzAkS. - 27.05.2012

I understood that you wannt to do command when player teleport to another player..
Nvm..