[Help] Icon
#1

Hello guys,

I've got a problem. I want to make a icon(1239) and when you stand on it a text must appear.
Can someone give me the script of this? Or how to make it?

I allready checked the https://sampwiki.blast.hk/wiki/PickupGuide and used the search button for like 2 hours..
Please I really need this one I hope someone can help me.
Reply
#2

under gamemode init
mypickup = CreatePickup(id, type, x, y, z);

under public OnPlayerPickupPickup(playerid, pickupid)
{
if (pickupid == mypickup)
SendClientMessage(playerid, COLOR_WHITE, "message");
}
Reply
#3

I don't have a OnPlayerPickupPickup in my script?
Reply
#4

C:\Documents and Settings\Joeri\Bureaublad\samp server\gamemodes\penls.pwn(7285) : error 017: undefined symbol "mypickup"
C:\Documents and Settings\Joeri\Bureaublad\samp server\gamemodes\penls.pwn(20971) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickupPickup")
C:\Documents and Settings\Joeri\Bureaublad\samp server\gamemodes\penls.pwn(20973) : error 017: undefined symbol "mypickup"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#5

pawn Код:
//top of script
new mypickup;

public OnGameModeInit()
{
mypickup = CreatePickup(id, type, x, y, z);
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if (pickupid == mypickup)
  {
   SendClientMessage(playerid, COLOR_WHITE, "message");
  }
}
Reply
#6

new Float, Float:y, Float:z;
new mypickup = CreatePickup(id, x, y, z);

public OnPlayerPickUpPickup(playerid, pickupid)
{

if (pickupid == mypickup)
)
GameTextForPlayer(playerid, "Message", 5000, 5);
}
Reply
#7

Top:

Код:
new mypickup;
GameModeInit:

Код:
pickup = CreatePickup(id, type, x, y, z);
Pickuppickup:

Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
  if (pickupid == pickup)
  {
  //code.
  }
  return 1;
}
Reply
#8

C:\Documents and Settings\Joeri\Bureaublad\samp server\gamemodes\penls.pwn(20972) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickupPickup")
C:\Documents and Settings\Joeri\Bureaublad\samp server\gamemodes\penls.pwn(20975) : warning 219: local variable "mypickup" shadows a variable at a preceding level
C:\Documents and Settings\Joeri\Bureaublad\samp server\gamemodes\penls.pwn(20975) : error 017: undefined symbol "id"
C:\Documents and Settings\Joeri\Bureaublad\samp server\gamemodes\penls.pwn(7286) : warning 204: symbol is assigned a value that is never used: "mypickup"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#9

dont just copy from everyone, change any needed things like "pickup" wich is "mypickup" in your script lol
Reply
#10

Notice the typing:

public OnPlayerPickUpPickup (playerid, pickupid)

also, if you already use something for "mypickup", just rename it
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)