Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 22,336
» Latest member: VertexFence
» Forum threads: 7,451
» Forum posts: 17,588

Full Statistics

Online Users
There are currently 1179 online users.
» 1 Member(s) | 1173 Guest(s)
Applebot, Baidu, Bing, Google, Yandex, Client Darius4678

Latest Threads
A Quiet Invitation to Ado...
Forum: General Support
Last Post: Darius4678
15 minutes ago
» Replies: 0
» Views: 13
Timeless Elegance, Made P...
Forum: General Support
Last Post: SeraphXS
29 minutes ago
» Replies: 0
» Views: 18
A Watch That Knows Your T...
Forum: General Support
Last Post: Darius4678
45 minutes ago
» Replies: 0
» Views: 17
Black Bull Extreme Don’t ...
Forum: General Discussion
Last Post: buyroyalhoneyvip
2 hours ago
» Replies: 0
» Views: 18
Compre pasaportes reales ...
Forum: Products Discussion
Last Post: douglasesmith1
2 hours ago
» Replies: 0
» Views: 8
Ephedrine powder for sale...
Forum: General Discussion
Last Post: generalagent
3 hours ago
» Replies: 0
» Views: 26
Erexiva Capsules – Powerf...
Forum: General Support
Last Post: congniflosaleofficial
6 hours ago
» Replies: 0
» Views: 57
Ketonic Capsules – שפר את...
Forum: General Support
Last Post: congniflosaleofficial
6 hours ago
» Replies: 0
» Views: 55
https://open.firstory.me/...
Forum: General Support
Last Post: UsTodayHealth
6 hours ago
» Replies: 0
» Views: 51
https://www.facebook.com/...
Forum: General Support
Last Post: HarryWalker
7 hours ago
» Replies: 0
» Views: 56

 
  How to create a pickup that can be picked-up on-foot and in-vehicle
Posted by: alimaroco - 04-13-2017, 11:10 PM - Forum: Tutorials - Replies (1)

 
his allows pickups to be picked up on foot and in vehicle. This is not much of a tutorial.

Requirements

The Script

First we make a limit for pickups, since we're gonna use 2 pickups per 1 pickup in this tutorial, we're gonna cut the limit in half

Code:

Quote:#define MAX_PICKUPS_EX (MAX_PICKUPS / 2) // which is 2048, Limit has been cut in half


Secondly, create the enum data structure for the ID storing

g_P_ID repesents the real pickup model that can only be picked up on - foot, and g_P_Invisible_ID represents the invisible model that can only be picked up in vehicle

Code:

Quote:enum e_Pickups
{
   g_P_ID,
g_P_Invisible_ID
};

Thirdly we create the variables for the iterator and to manipulate the enum

Code:

Quote:new gPickupData[MAX_PICKUPS_EX][e_Pickups],

Iterator:gPickups[MAX_PICKUPS_EX];


Fourthly we make the pickup creation function

This function creates the model and an invisible pickup (19300) SA-MP 0.3c+ (Is it?)

Code:

Quote:stock CreateStaticPickup(model, Float:x, Float:y, Float:z, virtualworld = 0)
{
        new id = Iter_Free(gPickups);
        gPickups[id][g_P_ID] = CreatePickup(model, 14, x, y, z, virtualworld);
        gPickups[id][g_P_Invisible_ID] = CreatePickup(19300, 14, x, y, z, virtualworld);
        return id;
}


Fifthly we create a way to SAFELY destroy the pickups

Code:

Quote:stock DestroyStaticPickup(id, &next)
{
     if(Iter_Contains(gPickups, id)) return -1;
     DestroyPickup(gPickups[id][g_P_ID]);
     DestroyPickup(gPickups[id][g_P_Invisible_ID]);
     Iter_SafeRemove(gPickups, id, next);
     return next;
}


Lastly, we need someway to detect if either ONE of the pickups were entered, right? Don't worry we only need this ONCE, because your not gonna enter the pickup while your in both states, the callback only gets called in either state

Code:

Quote:public OnPlayerPickUpPickup(playerid, pickupid)
{
foreach(gPickups, p)
{
   if(gPickups[p][g_P_ID] != pickupid && gPickups[p][g_P_Invisible_ID] != pickupid) continue;
   // do shit here
   new next; // I don't even think that this is needed, but for safety, let's leave it.
    p = DestroyStaticPickup(p, next); // Let's SAFELY destroy the pickup without breaking the loop
break;
}
return 1;
}


The Full Code

Code:

Quote:#define MAX_PICKUPS_EX (MAX_PICKUPS / 2) // which is 2048, Limit has been cut in half

enum e_Pickups
{
   g_P_ID,
   g_P_Invisible_ID
};

new gPickupData[MAX_PICKUPS_EX][e_Pickups],
Iterator:gPickups[MAX_PICKUPS_EX];

stock CreateStaticPickup(model, Float:x, Float:y, Float:z, virtualworld = 0)
{
      new id = Iter_Free(gPickups);
      gPickups[id][g_P_ID] = CreatePickup(model, 14, x, y, z, virtualworld);
      gPickups[id][g_P_Invisible_ID] = CreatePickup(19300, 14, x, y, z, virtualworld);
      return id;
}

stock DestroyStaticPickup(id, &next)
{
       if(Iter_Contains(gPickups, id)) return -1;
       DestroyPickup(gPickups[id][g_P_ID]);
       DestroyPickup(gPickups[id][g_P_Invisible_ID]);
       Iter_SafeRemove(gPickups, id, next);
       return next;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
foreach(gPickups, p)
{
   if(gPickups[p][g_P_ID] != pickupid && gPickups[p][g_P_Invisible_ID] != pickupid) continue;
   // do shit here
   new next; // I don't even think that this is needed, but for safety, let's leave it.
    p = DestroyStaticPickup(p, next); // Let's SAFELY destroy the pickup without breaking the loop
break;
}
return 1;
}

- Enjoy

Credits
  • Kalcor & The SA-MP Team (For SA-MP and the Invisible Object)

Print this item

  Hey ;)
Posted by: Peki - 04-13-2017, 10:28 AM - Forum: Self Introduction - Replies (5)

Hello, my name is Pero, i'm from Serbia. I'm 20years old and i'm working in lear.com
I'm good with clients, I'm willing to help i know many languages like eng, german,russian,balkanian ofc..,and a little bit of a franch. That's it.

Print this item

  Self Introduction
Posted by: alimaroco - 04-12-2017, 11:45 AM - Forum: Self Introduction - No Replies

Hello, My name is ali i'm 18 year's old .

Print this item

  Is there anyone?
Posted by: joker123 - 04-11-2017, 04:39 AM - Forum: General Discussion - Replies (6)

I didn't see activity on forum this month..
Anyone???

Print this item

  Staff Application!
Posted by: HippoCampus- - 04-08-2017, 09:39 PM - Forum: Recruitment process of EHN - Replies (5)

  • Real life name:Mgd

  • Location (place of residence)Tonguealestine

  • Full date of birth and age:4/7/2001-/ age = 16

  • When did you join the community? Like 1 month ago but ik it from 1 year

  • Why would you like to join the staff team? (255+ words):Yo, i wanna join Elites-Host Team To Help newbies and to show them rules about elites-host So, also iam active at forum to and Any help i will help them to fix servers and more info,, so no need 255+ also let me know if you need a help. I don't need any money for it just maybe some server i dont know we'll see.. And again im telling im available most of the day.finally, before this application gets too long, I would like to be a staff member in Elite-Host because I want to be a representing figure for your great servers, I want to contribute to the 10/10 staffing quality and overall i want too eventually become a possible mentor.,also have too many experience of becoming staff of an community,I also wanted to be a good and loyal staff of this host too since i joined this Hosting Community.[b]before this application gets too long, I would like to be a staff member in Elite-Host because I want to be a representing figure for your great servers, I want to contribute to the 10/10 staffing quality and overall i want too eventually become a possible mentor. [b]There has been occasions where there has been little staff on and as Member I can see how many people have been asking for help, [b]I do my best to follow the rules and make sure that players have the best experience possible. Another key factor that has persuaded me to apply for staff is the sometimes occurring lack of staff..Thanks[/b][/b][/b]



  • E-mail address:mjd.omar.99@gmail.com

Job/professions: N/A

Print this item

  Peki's Staff Application
Posted by: Peki - 04-01-2017, 09:24 PM - Forum: Recruitment process of EHN - Replies (8)

  • Real life name: Pero
  • Location (place of residence): Serbia
  • Full date of birth and age: 15.08.1996
  • When did you join the community? A week ago
  • Why would you like to join the staff team? (255+ words): I were thinking if you need game/voice support for your hosting, I'm available 24/7, if i'm not on computer im on a phone, i recieve a ticket notification and getting to computer or laptop. So what i know to do.. At the SA:MP i can do most of stuffs like scripting fixing errors doing gamemodes from 0 developing.. For cs 1.6 making plugins for "some mods" mostly of them are for jailbreak call of duty gun game and etc.. Call of duty just fixing errors, minecraft  only with plugins, voice like teamspeak and ventrilo permissions there i'm best. In most cases i work fast. So let me know if you need a help. I don't need any money for it just maybe some server i dont know we'll see.. And again im telling im available most of the day. Thanks. 
  • E-mail address: pekiiz987@gmail.com
  • Job/professions: www.lear.com in Serbia (city Novi Sad) If you asked about my current work well that's it, but if you asked what i know to do i already told, but shortly game(cod cs mc samp mw tf mta and etc..) and voice support(ts3, ventrilo)
  • And yes i know that i don't have the following things like posts and etc. but i know how to work with clients. You can put me on test to see how i work with servers..

Print this item

  Make Sure To Invite
Posted by: Jimmy - 04-01-2017, 03:53 PM - Forum: General Discussion - Replies (1)

Be sure to invite people and also use this to redeem your prizes:

https://forum.elites-host.com/showthread.php?tid=132

Print this item

  Ornamental Iron | Wrought Iron Fencing
Posted by: securitygates - 03-29-2017, 11:04 AM - Forum: General Discussion - Replies (2)

We focus on custom wrought iron gates, wrought iron fencing, wrought iron railings, courtyard gates and everything concerning for that Sacramento region! Iron Entry Gates

Print this item

  Server IP
Posted by: joker123 - 03-28-2017, 02:51 PM - Forum: Problems & Suggestions - Replies (4)

Can you change my server ip adress? It is: 185.12.178.71:7812, i would change only :7812 in 7777 if you can...
If you can't thx you anyway.

Print this item

Question Background Of A VPS
Posted by: Jimmy - 03-24-2017, 10:06 PM - Forum: VPS Discussions - Replies (3)

Hello,

You are probably reading this and wondering what this is. Basically I am going to help you understand what a VPS is and difference between a VPS and Dedicated server. I know when I first started renting I had no idea. Now to get to the good stuff.

VPS: Virtual Private Server. This is sometimes used for games but can also be used for Web-Hosting. You can get very cheap Virtual Private Servers but they may not be that game for game hosting. What could happen is you can run out of ram and or the server may be lagging for some users. They are really used for Web-Hosting. You can get some good deals out there but be very careful. Make sure you read what the specs of the machine are. Also a good rule of thumb is for VPS for gaming. For every 1 core you have that can run you 1 gaming server. Also make sure you have enough RAM. Also a VPS is usually ran off a Dedicated Server. So that's what Elites Host does. They host a Dedicated server and then run servers off it. That's why its good to buy a server to help them out Smile.

Now lets get to Dedicated Servers

Dedicated Server: Are really good to host Game server. If you willing to host many game servers then order a server either here or a different place. They really good on band-with and also ram, CPU, and hard-Drive space. VPS are usually ran off a Dedicated machine. So lets say we buy one Dedicated server then we can host many VPS to sell to people.

Now if you have any questions regarding this let me know  Smile

Print this item