04.02.2009, 12:41
You have made a logical mistake. Whenever the player types /lv, the SetVehiclePos code is executed. Whenever the player types a command that is not recognized, the SetPlayerPos code is executed. You have no check in place to see whether or not the player is currently in a car.
The problem is probably made more clear by using proper indenting of your code: (this is not a fix, just the same code with good indenting)
The problem is probably made more clear by using proper indenting of your code: (this is not a fix, just the same code with good indenting)
Код:
if(strcmp(cmd, "/lv", true) == 0) { SetVehiclePos(GetPlayerVehicleID(playerid), 2030.837158, 1343.022338, 10.415551); GameTextForPlayer(playerid, "~b~Las Venturas", 3000, 3); } else { SetPlayerPos(playerid,2030.837158, 1343.022338, 10.415551); GameTextForPlayer(playerid, "~b~Las Venturas", 3000, 3); } return 1; }