[HELP] AddStaticPickup
#1

I have added

AddStaticPickup(1239,2,-2129.4556,-188.1969,35.3203); //Mafia Exterior

And

AddStaticPickup(1239,2,964.7947,2160.0508,1011.030 3); //Mafia Interior

This icons is right infront of the door from the outside and the inside, so my quastion is...
How can I get a text that shows when you walk in one of this icons?
I want the text to say "To enter, type /entermafia" for the one outside and the one inside "To exit, type /exitmafia".

Thanks
Reply
#2

you give your pickup an id ( i assume you know how to with new pickupid; pickupid = AddstaticPickup(etc..))

The you go OnPlayerPickUpPickup

you put this code:
OnPlayerPickUpPickup(playerid,pickupid);
{
GameTextForPlayer(To enter, type /entermafia" for the one outside and the one inside "To exit, type /exitmafia etc....(iknownotcorrect));
return 1;
}

ps: make your pickup not able to dissapear
Reply
#3

Код:
new pickup;
new pickup2;

OnGameModeInIt() {

  pickup = CreatePickup(1239,1,-2129.4556,-188.1969,35.3203); //Mafia Exterior
  pickup2 = CreatePickup(1239,1,964.7947,2160.0508,1011.0303); //Mafia Interior
  return 1;
}
Код:
public OnPlayerPickUpPickup(playerid, pickupid) {

  if(pickupid == pickup) SendClientMessage(playerid,COLOR_WHITE,"To enter, type /entermafia");
  if(pickupid == pickup2) SendClientMessage(playerid,COLOR_WHITE,"To exit, type /exitmafia");
  return 1;
}
Reply
#4

Quote:
Originally Posted by M4S7ERMIND
Код:
new pickup;
new pickup2;

OnGameModeInIt() {

  pickup = CreatePickup(1239,1,-2129.4556,-188.1969,35.3203); //Mafia Exterior
  pickup2 = CreatePickup(1239,1,964.7947,2160.0508,1011.0303); //Mafia Interior
  return 1;
}
Код:
public OnPlayerPickUpPickup(playerid, pickupid) {

   if(pickupid == pickup) SendClientMessage(playerid,COLOR_WHITE,"To enter, type /entermafia");
  if(pickupid == pickup2) SendClientMessage(playerid,COLOR_WHITE,"To exit, type /exitmafia");
  return 1;
}
Cool, it works, but if I want a text like GameTextForPlayer(playerid,"/entermafia",3000,3);... how do I procced?
Reply
#5

public OnPlayerPickUpPickup(playerid, pickupid) {

if(pickupid == pickup) SendClientMessage(playerid,COLOR_WHITE,"To enter, type /entermafia");
if(pickupid == pickup2) SendClientMessage(playerid,COLOR_WHITE,"To exit, type /exitmafia");
GameTextForPlayer(playerid,"/entermafia",3000,3)
return 1;
}
Reply
#6

Quote:
Originally Posted by BiG_Sm0k3
public OnPlayerPickUpPickup(playerid, pickupid) {

if(pickupid == pickup) SendClientMessage(playerid,COLOR_WHITE,"To enter, type /entermafia");
if(pickupid == pickup2) SendClientMessage(playerid,COLOR_WHITE,"To exit, type /exitmafia");
GameTextForPlayer(playerid,"/entermafia",3000,3)
return 1;
}
Thanks, it works pefrect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)