[Pomoc]Teleport komanda

Započeo [BU]Niwwiak Cruze, Oktobar 26, 2011, 23:18:20 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GF edit
Detaljan opis problema:Napravio sam najobicniju komandu za teleport, tacnije ulazak u jednu garazu, problem je sledeci...Ja ukucam komandu i teleportujem se na koordinate koje su OK, ali kada se nalazim u vozilu teleportuje me na dobre koordinate al ne budem u vozilu, tacnije vozilo se teleportuje samnom ali ja se nalazim na njemu... ukoliko je potrebno jasnije objasniti, javite ...
Dio skripte: CMD:garaza(playerid, params[])
{
    if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (GetPlayerState(playerid) == 2)
{
if (PlayerToPoint(3.0, playerid,1238,177.9000,19.3000))
{
    GameTextForPlayer(playerid, "~y~Montgomery ~n~~w~garaza", 5000, 1);
    SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1276.4818,153.1366,-51.4274);
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1276.7609,153.2684,-51.8056);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
    }
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Nemate dozvolu da koristite ovu komandu!");
}
return 1;
}

Slike/Video:/

stavis provjeru
if(IsPlayerInAnyVehicle(playerid))
i
PutPlayerInVehicle(.. wiki :)

Samo dodaj:

if (PlayerToPoint(3.0, playerid,1238,177.9000,19.3000))
{
new
pSeat = GetPlayerVehicleSeat(playerid);

GameTextForPlayer(playerid, "~y~Montgomery ~n~~w~garaza", 5000, 1);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1276.4818,153.1366,-51.4274);
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1276.7609,153.2684,-51.8056);

PutPlayerInVehicle(playerid, tmpcar, pSeat);

TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}


Edit: I da dodaj IsPlayerInAnyVehicle() kao što je Karike rekao. :)
Poslednja Izmena: Oktobar 26, 2011, 23:22:52 POSLE PODNE od Paradox

Last nick: Paradox

To je to, reseno, hvala vam momci, moze ovde LOCK