I have a pickup
#1

i have this

//================================================== ============================ Jail
CreateObject(1501, 619.560486, -567.535645, 25.137306, 0.0000, 0.0000, 90.0000);//Door
AddStaticPickup(1239, 2, 2610.981750, -583.144531, 17.626646);//Icon Floor
AddStaticPickup(1239, 2, 619.161438, -566.806091, 25.512650);//Icon Roof
return 1;
}

when i walk into the object i dont get teleported
anyone know why
Reply
#2

Uh.. Where is the code where you try to change the players position ?
Reply
#3

Quote:
Originally Posted by afei™
Uh.. Where is the code where you try to change the players position ?
Код:
  if(pickupid == 20) { // G Down
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
    SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level
    SetCameraBehindPlayer(playerid);
  }
  else
    if(pickupid == 21) { // B 2 Up
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
    SetPlayerPos(playerid, 618.5887,-566.7526,26.1432); // Spawn Level
    SetCameraBehindPlayer(playerid);
  }
  return 1;
}
Reply
#4

You must define the pickup.
pawn Код:
//On top of the script
new pickup1, pickup2;

//OnGameModeInit
pickup1 = CreatePickup(1239, 2, 2610.981750, -583.144531, 17.626646);//Icon Floor
pickup2 = CreatePickup(1239, 2, 619.161438, -566.806091, 25.512650);//Icon Roof

//Then check it in OnPlayerPickUpPickup
  if(pickupid == pickup1) { // G Down
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
    SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level
    SetCameraBehindPlayer(playerid);
  }
  else
    if(pickupid == pickup2) { // B 2 Up
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
    SetPlayerPos(playerid, 618.5887,-566.7526,26.1432); // Spawn Level
    SetCameraBehindPlayer(playerid);
  }
  return 1;
}
Reply
#5

Quote:
Originally Posted by Pyrokid
You must define the pickup.
pawn Код:
//On top of the script
new pickup1, pickup2;

//OnGameModeInit
pickup1 = CreatePickup(1239, 2, 2610.981750, -583.144531, 17.626646);//Icon Floor
pickup2 = CreatePickup(1239, 2, 619.161438, -566.806091, 25.512650);//Icon Roof

//Then check it in OnPlayerPickUpPickup
  if(pickupid == pickup1) { // G Down
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
    SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level
    SetCameraBehindPlayer(playerid);
  }
  else
    if(pickupid == pickup2) { // B 2 Up
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
    SetPlayerPos(playerid, 618.5887,-566.7526,26.1432); // Spawn Level
    SetCameraBehindPlayer(playerid);
  }
  return 1;
}
Ok thanks, it works but only one of the pickups work


Код:
  if(pickupid == pickup1) { // G Down
    SendClientMessage(playerid, 0xA9A9A9AA, "|_Police HQ - B 1_|");
    SetPlayerPos(playerid, 610.9496,-583.5366,18.2033); // Spawn Level
    SetCameraBehindPlayer(playerid);
  }
this one doesent work, the other one does ;P

The object i, shows up but its solid when you walk into it you dont get teleported
Reply
#6

I HAVE FIXED IT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)