Made location script for pawn.
http://vicecitymultiplayer.com/dl.php?f=13
Hope it helps you guys out.
thanks Falcon, this will help alot of people with learning the language and setting up their own scripts (including me :P) majorly
this script just support english ?
sorry for my bad english :)
ADD PAWN WIKI! :p
Have just 3 questions:
Quotepublic OnPlayerConnect(playerid)
{
SetWaterLevel(6.0);
SetGamespeed(100);
SetGravity(100);
GetPlayerName(playerid,gPlayers[playerid],MAX_PLAYER_NAME);
return 1;
}
1. SetGravity & other stuff are working for a SELECTED player, not for all on server?
2. For what do you need GetPlayerName? Doesnt make sense for me if not used in a function rofl
3. And what if i forget return 1?
1.Work for all
2.GetPlayer name is the definition of event getplayername when somebody join the server for others use
3.If u dont put return1 the Event will be not finished yet
Aww thx Trix :). But i still dont understand why the gravity should be always changed to 100 for all, when a player joins :/.
thankyou falcon, this is perfect. (apart that i had to spend a day trying to find it)
would you issue it with the linux/window server thats on the main vice city multiplayer site please, because the script released there is different to this one, and no one can create areas unless they have this, but they have to spend days looking for it :-(
Quote from: [AoD]NC on January 14, 2010, 06:47:45 PM
Aww thx Trix :). But i still dont understand why the gravity should be always changed to 100 for all, when a player joins :/.
I don't think you have to, as it's not player specific. Changing it to 100 at OnGameModeInit should be enough, although I fail to understand why you have to set it anyway? Isn't the default gravity value 100?
Quote from: Ettans on February 07, 2010, 08:19:19 AM
I fail to understand why you have to set it anyway? Isn't the default gravity value 100?
It is a default mode, upon which most people base their scripts. Don't you think it will be easier for them just to change that value instead of finding the corresponding function in the list and then figuring out where to put it?
And, yes, setting gravity in OnPlayerConnect is not neccessary.
You could also make the code a lot shorter and easier to modify, by using one single array for the location names and coordinates.
enum zMain
{
name[64],
Float:area[6]
};
static const zones[][zMain] =
{
{"Starfish Island",{-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
{"Ammunation-North-Point-Mall",{-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
{"VC International",{-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}}
};
Note: The coordinates used in this array are random.
ettans, thankyou, would you make it in a .pwn file for me
You'd have to do it yourself, as you'll need to use the location name, xmin,ymin,zmin,xmax,ymax and zmax from Falcon's code and place it one single array, like I showed. Alternatively you can convert the zone data yourself, I believe it's in a .dat file somewhere in GTA Vice City folder. Most likely zon.dat or zone.dat, or something similar.
Quote from: [AoD]NC on January 14, 2010, 06:47:45 PM
Aww thx Trix :). But i still dont understand why the gravity should be always changed to 100 for all, when a player joins :/.
If you need help i can script a cmd to change gravity ingame ;D
You learn something new everyday! i didnt know all were in zone.dat. thanks!
@Trix: the only what i want to now is WHY the gravity should be changed every time. WHY?
You don't have to, it's pointless.
Quote from: Ettans on February 07, 2010, 01:08:38 PM
You could also make the code a lot shorter and easier to modify, by using one single array for the location names and coordinates.
enum zMain
{
name[64],
Float:area[6]
};
static const zones[][zMain] =
{
{"Starfish Island",{-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
{"Ammunation-North-Point-Mall",{-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
{"VC International",{-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}}
};
Note: The coordinates used in this array are random.
You can do that but Then Newbies won't understand it easily
i'm quite new with these arrays you put, could anyone please tell me how to check if someone is inside the boundaries of these locs?
Any mirrors for this?
thanks ;D
looking for a re up please :)
The link isn't working, can you post a new one?
for getting location for a command to decide if a player is close enough to an object I just use GetPlayerDistance
I think the same location code is present in GUPS script.
You can extract it from GUPS.
Oh btw, i see some year old posts on previous page.
You have to set grav and speed onPlayerConnect because theres a bug in VCMP, that resets normal grav/speed whenever a new player joins the server.
If it resets itself then why would you need to reset it yourself?
please Re-upload linnk its not working :(:(
Quote from: yazeen on March 27, 2011, 01:19:45 PM
please Re-upload linnk its not working :(:(
YEAH PLZ