21.04.2010, 05:09
Hello..
I made a script..
It works alright, but this is what I want..
If the player is in a vehicle then he'll teleport to the place with his old vehicle, not leaving it there and tp there on foot.
The script needs to check in wich vehicle he is and then put him in it, but I can't do it.
Could any of you tell me how to do it?
Thank you!
I made a script..
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/enter", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid,2.0,135.2182,1950.1426,19.3887)) { GetPlayerVehicleID(playerid); SetPlayerPos(playerid,134.6227,1934.9200,19.2617); } return 1; } if (strcmp("/exit", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid,2.0,134.6227,1934.9200,19.2617)) { GetPlayerVehicleID(playerid); SetPlayerPos(playerid,135.2182,1950.1426,19.3887); SetTimerEx("omgomg",1000,false,"i",4); } return 1; } if (strcmp("/tp", cmdtext, true, 10) == 0) { GetPlayerVehicleID(playerid); SetPlayerPos(playerid,135.2182,1950.1426,19.3887); SetTimerEx("omgomg",1000,false,"i",4); return 1; } return 0; } public omgomg(playerid, vehicleid) { PutPlayerInVehicle(playerid, vehicleid, 0); return 1; }
If the player is in a vehicle then he'll teleport to the place with his old vehicle, not leaving it there and tp there on foot.
The script needs to check in wich vehicle he is and then put him in it, but I can't do it.
Could any of you tell me how to do it?
Thank you!