Health & Armor Icons
#1

Hey, im just wondering how do i add walkthrough icons like Armor And Health so when u walk in them you get either Armor Or Health?
Reply
#2

AddStaticPickup or CreatePickup.
Reply
#3

Quote:
Originally Posted by Backwardsman97
AddStaticPickup or CreatePickup.
Hmm could you help me out a bit more im new to scripting, well you know the Big tower in LV? Looks like a penis abit? Yeah, how would i be able to add a Armor Icon There? Cheers
Reply
#4

Quote:
Originally Posted by Phame
Quote:
Originally Posted by Backwardsman97
AddStaticPickup or CreatePickup.
Hmm could you help me out a bit more im new to scripting, well you know the Big tower in LV? Looks like a penis abit? Yeah, how would i be able to add a Armor Icon There? Cheers
Haha. Yeah. Just go in game to the top or wherever you want and type /save. It will save your coords to a file in your gta directory. Then get the x, y, z coords from the file. And use them in the function.
Reply
#5

like
[pawn] addstaticpickup([id],x,y,z)
Reply
#6

k i got my script down

Код:
// Armor Under Tower
new pickup;
pickup = CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );
 
// Health Over Beside Tower
new pickup;
pickup = CreatePickup ( 1240, 2, 2208.0178, 1285.5035, 10.8203 );

// Health Behind Hideout
new pickup
pickup = CreatePickup ( 1240, 2, 1881.8005, 1628.8505, 10.6310 );

// Armor Behind Hideout
new pickup
pickup = CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );
I dono where to put it in my GM :S
Reply
#7

Well for one thing, you don't need to store the pickup id although that's the wrong way to do it. You would have to create different global variables each with a specific name. But you should put that under OnGameModeInit. Like this.

pawn Код:
public OnGameModeInit()
{
   // Armor Under Tower
   CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );
 
   // Health Over Beside Tower
   CreatePickup ( 1240, 2, 2208.0178, 1285.5035, 10.8203 );

   // Health Behind Hideout
   CreatePickup ( 1240, 2, 1881.8005, 1628.8505, 10.6310 );

   // Armor Behind Hideout
   CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );
   return 1;
}
Reply
#8

Quote:
Originally Posted by Backwardsman97
Well for one thing, you don't need to store the pickup id although that's the wrong way to do it. You would have to create different global variables each with a specific name. But you should put that under OnGameModeInit. Like this.

pawn Код:
public OnGameModeInit()
{
  // Armor Under Tower
  CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );
 
  // Health Over Beside Tower
  CreatePickup ( 1240, 2, 2208.0178, 1285.5035, 10.8203 );

  // Health Behind Hideout
  CreatePickup ( 1240, 2, 1881.8005, 1628.8505, 10.6310 );

  // Armor Behind Hideout
  CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );
  return 1;
}
i got errors
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitwo rks.pwn(367) : error 017: undefined symbol "Health"
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitwo rks.pwn(367) : error 017: undefined symbol "Icons"
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitwo rks.pwn(36 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitwo rks.pwn(36 : error 017: undefined symbol "Reply"
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitwo rks.pwn(368 -- 369) : warning 215: expression has no effect
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitwo rks.pwn(369) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitwo rks.pwn(369) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#9

Sorry for double post

k ill show u my script thing

pawn Код:
public OnGameModeInit()
{
   // Armor Under Tower
   CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );

   // Health Over Beside Tower
   CreatePickup ( 1240, 2, 2208.0178, 1285.5035, 10.8203 );

   // Health Behind Hideout
   CreatePickup ( 1240, 2, 1881.8005, 1628.8505, 10.6310 );

   // Armor Behind Hideout
   CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );
   return 1;

    SetGameModeText("NZ Fun Server");
    AddObjects();
    ShowPlayerMarkers(1);
    ShowNameTags(1);
and this error now :

Код:
C:\Documents and Settings\Oscar\Desktop\Server\gamemodes\ithinkitworks.pwn(378) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#10

The return must be the last thing.

pawn Код:
public OnGameModeInit()
{
   // Armor Under Tower
   CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );

   // Health Over Beside Tower
   CreatePickup ( 1240, 2, 2208.0178, 1285.5035, 10.8203 );

   // Health Behind Hideout
   CreatePickup ( 1240, 2, 1881.8005, 1628.8505, 10.6310 );

   // Armor Behind Hideout
   CreatePickup ( 1242, 2, 1881.5703, 1635.9821, 10.6411 );

   SetGameModeText("NZ Fun Server");
   AddObjects();
   ShowPlayerMarkers(1);
   ShowNameTags(1);
   return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)