SA-MP Forums Archive
When in pickup, text appears - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: When in pickup, text appears (/showthread.php?tid=93726)



When in pickup, text appears - Puzi - 26.08.2009

Hey there,

I wonder whether it is possible, when someone enters a pickup that is that yellow icon ''i'' then would the text appear for him like: *** This house is owned by [TDM]Puzi. Type /homemarket to see available houses (on chat, not as gametext). Is that possible? If yes, could someone give me an example?

Thanks and Regards
Puzi


Re: When in pickup, text appears - James_Alex - 26.08.2009

create a pickup
then use "onplayerpickuppickup)
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup



Re: When in pickup, text appears - Puzi - 26.08.2009

Thank you a lot, but I have a small problem.
Код:
public OnPlayerPickUpPickup(playerid, pickupid)  //Ten Pickup Odpowiada po wejściu w Pickup
{
  if (pickupid == DomPuzi)
  {
    SendClientMessage(playerid, COLOR_GREY, "|_______ AGENCJA MIESZKANIOWA / HOUSING AGENCY ______|");
    SendClientMessage(playerid, COLOR_ADMIN, "Owner / Własciciel: [TDM]Puzi");
    SendClientMessage(playerid, COLOR_ADMIN, "Name and ID / Nazwa oraz ID: Puzi Field, 0");
  }
}
{
  else if (pickupid == DomDavid)
  {
    SendClientMessage(playerid, COLOR_GREY, "|_______ AGENCJA MIESZKANIOWA / HOUSING AGENCY ______|");
    SendClientMessage(playerid, COLOR_ADMIN, "Owner / Własciciel: [TDM]DavidG");
    SendClientMessage(playerid, COLOR_ADMIN, "Name and ID / Nazwa oraz ID: David's House, 1");
  }
}
Код:
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(4194) : error 055: start of function body without function header
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(4195) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Whats wrong here?


Re: When in pickup, text appears - Jefff - 26.08.2009

Brackets


Re: When in pickup, text appears - Puzi - 26.08.2009

Thought so, I wonder which ones, I can't get to it :S


Re: When in pickup, text appears - Jefff - 26.08.2009

Код:
public OnPlayerPickUpPickup(playerid, pickupid)  //Ten Pickup Odpowiada po wejściu w Pickup
{
  if (pickupid == DomPuzi)
  {
    SendClientMessage(playerid, COLOR_GREY, "|_______ AGENCJA MIESZKANIOWA / HOUSING AGENCY ______|");
    SendClientMessage(playerid, COLOR_ADMIN, "Owner / Własciciel: [TDM]Puzi");
    SendClientMessage(playerid, COLOR_ADMIN, "Name and ID / Nazwa oraz ID: Puzi Field, 0");
  }
  else if (pickupid == DomDavid)
  {
    SendClientMessage(playerid, COLOR_GREY, "|_______ AGENCJA MIESZKANIOWA / HOUSING AGENCY ______|");
    SendClientMessage(playerid, COLOR_ADMIN, "Owner / Własciciel: [TDM]DavidG");
    SendClientMessage(playerid, COLOR_ADMIN, "Name and ID / Nazwa oraz ID: David's House, 1");
  }
  return 1;
}



Re: When in pickup, text appears - Puzi - 26.08.2009

Thanks man