Author Topic: [PAWN] Pickup function  (Read 8996 times)

0 Members and 1 Guest are viewing this topic.

Offline Frankie

  • Street Thug
  • *
  • Posts: 5
    • View Profile
[PAWN] Pickup function
« on: March 26, 2010, 02:58:46 pm »
The syntax given in my script file (downloaded as GUPS 1.15) is this:

Quote
AddStaticPickup(id, type, Float:x, Float:y, Float:z, ammo, respawnseconds)

However, this does not correspond with the pawno default syntax. This means not only does it produce errors when compiling (nothing of grave concern) but it means the last 2 parts of the function do not work.

I can get around the ammo problem by placing loadsa pickups in the same place (messy but it works) but I cannot get around the respawn seconds problem.

It is essential to my script to have pickups that are either permanent or appear to be; ie respawning in a matter of milliseconds.

Is there any way for this to work? If not I suggest it is added to the next patch.

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: [PAWN] Pickup function
« Reply #1 on: March 26, 2010, 03:18:45 pm »
The correct syntax is
Code: [Select]
AddStaticPickup(id, type, Float:x, Float:y, Float:z).

There is currently no way to either respawn pickups or set their ammo.

Offline Frankie

  • Street Thug
  • *
  • Posts: 5
    • View Profile
Re: [PAWN] Pickup function
« Reply #2 on: March 26, 2010, 03:41:28 pm »
There is currently no way to either respawn pickups or set their ammo.
:-[

Is there any information about whether it will be in the next version/patch?

Also why is that syntax given if it doesn't work? I'm assuming it wasn't put there by Tamas or any of the other GUPS contributors.

The default pickup time is what like, 4 minutes? I could have sworn I saw a server around that had faster respawn time than that.


/edit One server I saw was Miami-Dade racing server. That is done on mIRC, does that mean it is possible with an MRC script, but not with a pawn one?

Offline ramandu

  • Street Thug
  • *
  • Posts: 16
    • View Profile
Re: [PAWN] Pickup function
« Reply #3 on: March 26, 2010, 03:48:20 pm »
a timer worked for me, sometimes forcing these things works

Offline Frankie

  • Street Thug
  • *
  • Posts: 5
    • View Profile
Re: [PAWN] Pickup function
« Reply #4 on: March 26, 2010, 04:19:50 pm »
How would I go about that? Is it a simple script?

Sorry I'm new to scripting, not very experienced with it.

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: [PAWN] Pickup function
« Reply #5 on: March 26, 2010, 05:42:31 pm »
Pawn and mrc servers are currently gradually different. While mrc has been there for a while, pawn has been implemented just recently, so it is currently in many ways inferior to mrc. And, since most of the servers are mrc (probably for that very reason), you have probably seen "quicker" pickups on one of them.

Speaking of Miami-Dade, it uses squirrel server, which functionality is different from both mrc and pawn ones, so don't be surprised to see anything there.

Offline Frankie

  • Street Thug
  • *
  • Posts: 5
    • View Profile
Re: [PAWN] Pickup function
« Reply #6 on: March 26, 2010, 06:17:49 pm »
One would wonder why the people in charge would introduce a new scripting base with less 'true' functionality than the previous one. You'll probably say something like it is a base that can be developed in the future to exceed the functionality of mIRC, well isn't that what beta tests are for? Or is R2 just one big beta test?

Also, not only to introduce this inferior base but then proclaim it to new users as the right/only method to use, seems questionable. A quote lifted from the official vcmp wiki, developed by yourself if I'm not wrong 'Boss':

Quote
Scripting in VC-MP is done via the means of pawn scripting language. There are many editors [1] for it avaliable, but Pawno is a most common one.

Why release a new version and then digress from the already established functionality?

Providing one and only one scripting method on the 'official' wiki, when there are more useful ones out there, just seems ignorant.

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: [PAWN] Pickup function
« Reply #7 on: March 26, 2010, 07:03:32 pm »
Why release a new version and then digress from the already established functionality?
I suppose it was done in order for scripters to get aquainted with pawn (for those who had no experience with SA:MP's scripting). Also, while having "digressed" functionality (which can be seen only in few functions), pawn features more "integrated" scripting solution - you don't have to connect scripts to server, they can't suddenly "timeout" from etc.

Plus, it is safe to say that the upcoming release (which is, I repeat yet again, uses pawn) is absolutely superior to mrc.

Providing one and only one scripting method on the 'official' wiki, when there are more useful ones out there, just seems ignorant.
1) I don't think you know the basics of wikis. They are not "big readmes", written by devs/testers, they are free-to-edit databases to which anyone can contribute.
2) As a result of above, content greatly depends on contributors. I, as one of the biggest contributors, had only enough knowledge/will/time to fill in pawn information. You are free to add mrc/squirrel information if you feel it's missing.
3) There is an unofficial wiki, hosted by VRocker, which covers mrc and squirrel scripting. It can be found here -> http://liberty-unleashed.co.uk/VCWiki/Main_Page

Offline Frankie

  • Street Thug
  • *
  • Posts: 5
    • View Profile
Re: [PAWN] Pickup function
« Reply #8 on: March 31, 2010, 06:12:37 pm »
//off-topic Ok fair enough, I am presuming here that you are the person who wrote 'Scripting in VC-MP is done via the means of pawn scripting language.' As you are the person who set up the wiki, meaning you did the framework. Anyway this is a moot point, just nit-picking really.

It is nice to know there is also an 'un-official' wiki that documents things to a higher degree than the 'official' wiki, perhaps it would be in your interest to include a link to that wiki underneath your official one, so as to provide a fair alternative and means to learn mIRC scripting if we so choose.

//on-topic
So how would I go about setting a timer in pawn to 'force' the pickup into staying there/respawning quickly?

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: [PAWN] Pickup function
« Reply #9 on: March 31, 2010, 08:27:43 pm »
So how would I go about setting a timer in pawn to 'force' the pickup into staying there/respawning quickly?
Not currently possible, since AddStaticPickup can only create pickups in OnGameModeInit. But, once it is possible, you would use OnPickedUp for that.

Offline Jancis_LV

  • Street Thug
  • *
  • Posts: 37
    • View Profile
    • Latvian Vice City
Re: [PAWN] Pickup function
« Reply #10 on: March 31, 2010, 10:54:12 pm »
Ammo works, but respawn seconds not, i tested that about week ago.
Latvian Vice City server
78.84.47.75:5192