07.03.2014, 15:13
So, I've been pondering how to set up a code that allows me to teleport to another area while keeping the same car I found lying around.
I mean so far I have just the basic code:
but that code will rip me from my car and place me on my feet in front of the PD.
Now, I've also been surfing the web to find a similar case with this but all the examples I seen surround a vehicle spawn system. That's not what I've been wanting.
I have it set up so there are random cars lying around the map that a player can go up to and get in/drive. But currently if they use a teleport command that I have set up it will rip them from their car..
Is there a way to check if a player is in a car and then teleport them to the desired location with that same car?
I mean so far I have just the basic code:
PHP код:
if (strcmp("/lspd", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1521.8848,-1670.7667,13.5469);
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the local police station of Las Santos!");
return 1;
}
Now, I've also been surfing the web to find a similar case with this but all the examples I seen surround a vehicle spawn system. That's not what I've been wanting.
I have it set up so there are random cars lying around the map that a player can go up to and get in/drive. But currently if they use a teleport command that I have set up it will rip them from their car..
Is there a way to check if a player is in a car and then teleport them to the desired location with that same car?