Bugs :S [Solved]
#1

Ok, So I'm making a teleport to the 8-track stadium which requies you to be in a vehile to use this command.
But I have 2 problems.

When you try to teleport to 8-track on foot, It still sets your interior and saying a message, 'Welcome to the 8-track stadium.' AND 'You need to be in a vehicle to use this command.'
You aren't teleported to the 8-track yet as it blocks the teleport when you are on foot.

And another problem is when you are in a vehicle, Everything is alright EXCEPT, The vehicle is invisible.

This is my code:

pawn Код:
if(strcmp(cmdtext, "/8-track", true) == 0) {
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, COLOR_GREEN1, "Welcome to the 8-track race.");
SetPlayerInterior(playerid, 7);
LinkVehicleToInterior(playerid, 7);
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid), -1399.23, -218.98, 1043.14);
else SendClientMessage(playerid, red, "You need to be in a vehicle to use this command");
return 1;
}
Can anybody help? Thanks.

Reply
#2

Try wrapping it up a bit more, looks cleaner too.

pawn Код:
if(strcmp(cmdtext, "/8-track", true) == 0)
{
   if(IsPlayerInAnyVehicle(playerid))
   {
     SetVehiclePos(GetPlayerVehicleID(playerid), -1399.23, -218.98, 1043.14);
     LinkVehicleToInterior(GetPlayerVehicleID(playerid), 7);
     ResetPlayerWeapons(playerid);
     SendClientMessage(playerid, COLOR_GREEN1, "Welcome to the 8-track race.");
     SetPlayerInterior(playerid, 7);
   }
   else
   {
     SendClientMessage(playerid, red, "You need to be in a vehicle to use this command");
   }
   return 1;
}
Reply
#3

Thanks Even if it's easy, This idea just not comes up in my mind. Thanks again
Have a nice weekend.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)