#1

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 !
Reply
#2

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

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
Reply
#4

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;
}
Reply
#5

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


Forum Jump:


Users browsing this thread: 2 Guest(s)