new lspdenter; new lspdexit;
public OnGameModeInit() { new string[MAX_PLAYER_NAME]; new string1[MAX_PLAYER_NAME]; for(new c=0;c<CAR_AMOUNT;c++) { lspdexit = CreatePickup(1239, 1, 257.8357,82.7456,1002.4453); lspdenter = CreatePickup(1239, 1, 1568.2990,-1691.2732,5.8906); Gas[c] = GasMax; } // the code is here not ending...
public OnPlayerPickUpPickup(playerid, pickupid) { if (pickupid == lspdenter) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 1568.4508,-1697.0718,5.8906); SetPlayerFacingAngle(playerid, 175.2836); DestroyPickup(lspdenter); SendClientMessage(playerid, COLOR_WHITE, "Du bist runter in die PD-Garage gegangen!"); lspdenter = AddStaticPickup(1239, 1, 1568.2990,-1691.2732,5.8906); } if (pickupid == lspdexit) { SetPlayerInterior(playerid, 6); SetPlayerPos(playerid, 254.4400,86.5069,1002.4453); SetPlayerFacingAngle(playerid, 24.4550); DestroyPickup(lspdexit); SendClientMessage(playerid, COLOR_WHITE, "Du bist hoch ins Police Department gegangen!"); lspdexit = AddStaticPickup(1239, 1, 257.8357,82.7456,1002.4453); } return 1; }
Originally Posted by Stylerboy
Hey guys,
i made teleport pickups from LSPD garage to LSPD interior 6 ( where the jail is ) . I was searching here and found many topics with the same problem. I fixed all faults in the code and compile, but though it compiled successfully, the teleports aren't working. I don't know what i make wrong, here is my code, i hope you can show me a solution Код:
new lspdenter; new lspdexit; Код:
public OnGameModeInit() { new string[MAX_PLAYER_NAME]; new string1[MAX_PLAYER_NAME]; for(new c=0;c<CAR_AMOUNT;c++) { lspdexit = CreatePickup(1239, 1, 257.8357,82.7456,1002.4453); lspdenter = CreatePickup(1239, 1, 1568.2990,-1691.2732,5.8906); Gas[c] = GasMax; } // the code is here not ending... Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if (pickupid == lspdenter) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 1568.4508,-1697.0718,5.8906); SetPlayerFacingAngle(playerid, 175.2836); DestroyPickup(lspdenter); SendClientMessage(playerid, COLOR_WHITE, "Du bist runter in die PD-Garage gegangen!"); lspdenter = CreatePickup(1239, 1, 1568.2990,-1691.2732,5.8906); } if (pickupid == lspdexit) { SetPlayerInterior(playerid, 6); SetPlayerPos(playerid, 254.4400,86.5069,1002.4453); SetPlayerFacingAngle(playerid, 24.4550); DestroyPickup(lspdexit); SendClientMessage(playerid, COLOR_WHITE, "Du bist hoch ins Police Department gegangen!"); lspdexit = CreatePickup(1239, 1, 257.8357,82.7456,1002.4453); } return 1; } |
new toinsidelspd; // LSPD Police Department new toinsidegarage; //LSPD Garage
public OnGameModeInit() { new string[MAX_PLAYER_NAME]; new string1[MAX_PLAYER_NAME]; for(new c=0;c<CAR_AMOUNT;c++) { toinsidelspd = CreatePickup(1239, 1, 1568.1727,-1691.2698,5.8906); toinsidegarage = CreatePickup(1239, 1, 257.7452,82.7204,1002.4453);
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == toinsidelspd) { SetPlayerInterior(playerid, 6); SetPlayerPos(playerid, 255.0044,86.9834,1002.4453); SetPlayerFacingAngle(playerid, 4.0366); DestroyPickup(toinsidelspd); SendClientMessage(playerid, COLOR_WHITE, "Du bist hoch ins Police Department gegangen!"); toinsidelspd = CreatePickup(1239, 1, 1568.1727,-1691.2698,5.8906); } if(pickupid == toinsidegarage) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 257.7452,82.7204,1002.4453); SetPlayerFacingAngle(playerid, 140.0447); DestroyPickup(toinsidegarage); SendClientMessage(playerid, COLOR_WHITE, "Du bist runter in die PD Garage gegangen!"); toinsidegarage = CreatePickup(1239, 1, 257.7452,82.7204,1002.4453); } return 1; }
new toinsidelspd; // LSPD Police Department
new toinsidegarage; //LSPD Garage
//OnGameModeInit
toinsidelspd = CreatePickup(1239, 1, 1568.1727,-1691.2698,5.8906);
toinsidegarage = CreatePickup(1239, 1, 257.7452,82.7204,1002.4453);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == toinsidelspd)
{
SetPlayerInterior(playerid, 6);
SetPlayerFacingAngle(playerid, 4.0366);
SetPlayerPos(playerid, 255.0044, 86.9834, 1002.4453);
SendClientMessage(playerid, COLOR_WHITE, "Du bist hoch ins Police Department gegangen!");
}
if(pickupid == toinsidegarage)
{
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 140.0447);
SetPlayerPos(playerid, 1566.1727, -1691.2698, 5.8906); //these cords were wrong
SendClientMessage(playerid, COLOR_WHITE, "Du bist runter in die PD Garage gegangen!");
}
return true;
}
SendClientMessage(playerid, COLOR_WHITE, "Du bist hoch ins Police Department gegangen!"); // translation: You were ported to inside of the LSPD
SendClientMessage(playerid, COLOR_WHITE, "Du bist runter in die PD Garage gegangen!"); // translation: You were ported to LSPD garage