else if (PlayerToPointStripped(1.5, playerid,****.****,-***.****,*****, cx,cy,cz))//--islandx { //--islandx SetPlayerPos(playerid, 1479.4783,-1739.2612,13.5469); GameTextForPlayer(playerid, "~w~Welcome back!",5000,1); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; } return 1;
Originally Posted by r9x
i know how to code a teleport poin like this
Код:
else if (PlayerToPointStripped(1.5, playerid,****.****,-***.****,*****, cx,cy,cz))//--islandx { //--islandx SetPlayerPos(playerid, 1479.4783,-1739.2612,13.5469); GameTextForPlayer(playerid, "~w~Welcome back!",5000,1); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; } return 1; i need this code but i want to take my vehicle with me any idea? |
else if (PlayerToPointStripped(1.5, playerid,****.****,-***.****,*****, cx,cy,cz))//--islandx
{
//--islandx
if(IsPlayerInAnyVehicle(playerid)){
new vid = GetPlayerVehicleID(playerid);
SetVehiclePos(vid, 1479.4783,-1739.2612,13.5469);
LinkVehicleToInterior(vid,0);
SetPlayerInterior(playerid,0);
}else{
SetPlayerPos(playerid, 1479.4783,-1739.2612,13.5469);
SetPlayerInterior(playerid,0);
}
GameTextForPlayer(playerid, "~w~Welcome back!",5000,1);
PlayerInfo[playerid][pInt] = 0;
}
return 1;
else if (PlayerToPointStripped(3.5, playerid,2781.3186,-2494.4221,13.3880, cx,cy,cz))//--deathrace { //--deathrace if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, 1875.3357,2546.0020,13.8687); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerPos(playerid, 1875.3357,2546.0020,13.8687); } GameTextForPlayer(playerid, "~w~Welcome to Deathrace!",5000,1); PlayerInfo[playerid][pInt] = 0; } return 1;
else if (PlayerToPointStripped(3.5, playerid,2781.3186,-2494.4221,13.3880, cx,cy,cz))//--deathrace { //--deathrace if (IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(GetPlayerVehicleID(playerid), 1875.3357,2546.0020,13.8687); TelePos[playerid][0] = 0.0; TelePos[playerid][1] = 0.0; } else if(!IsPlayerInAnyVehicle(playerid)) { SetPlayerPos(playerid, 1875.3357,2546.0020,13.8687); } GameTextForPlayer(playerid, "~w~Welcome to Deathrace!",5000,1); PlayerInfo[playerid][pInt] = 0; } return 1;
Originally Posted by r9x
well i dont want to teleport ibn a virworld or interior so that should be 0
its only from a postion outside to another position outside oO ill try you code and report back thnx ok i used your code 1:1 but it teleports still only me.. if im in vehicle it does nothing oO im realy confused the code says that it should teleport the vehicle with me.. but its not working.. hmm dammed |
if(strcmp(cmd, "/deathrace", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid, 8, *********************)) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, *********************); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else { SetPlayerPos(playerid, ********************); } SendClientMessage(playerid, COLOR_GRAD1, " You entered DeathRace !"); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; } else { SendClientMessage(playerid, COLOR_GRAD1, " Wrong place to enter /deathrace !"); } } return 1; }