Argonath RPG - A World of its own
Argonath RPG Community => Hardware/Software support => Resolved issues => Topic started by: Fatboy_Rob on November 22, 2007, 12:11:51 am
-
Ok, What i wanna do, is make my character spawn INSIDE an interior. Dave said this will not work, but i disagree, cause ive seen it in one of the Crapppy Game modes that comes with SAMP Server thingy.
Here is co-ordinates
AddPlayerClass(188,2247.9373,-1163.9312,1029.7969,5.2074,0,0,0,0,0,0); // JeffoINT1
The interior is ID 15
ive looked on SAMP forums, and even posted, and i didnt get any help, just smartass comments.
Here are the charcter spawns that i have, that all work
public OnGameModeInit()
{
SetGameModeText(" Haydens Fire");
AddPlayerClass(170,2231.8018,-1177.7627,29.8044,38.2942,0,0,0,0,0,0); // JeffoETERIOR
AddPlayerClass(180,2231.8018,-1177.7627,29.8044,38.2942,0,0,0,0,0,0); // JeffoETERIOR
AddPlayerClass(233,2231.8018,-1177.7627,29.8044,38.2942,0,0,0,0,0,0); // JeffoETERIOR
AddPlayerClass(68,2231.8018,-1177.7627,29.8044,38.2942,0,0,0,0,0,0); // JeffoETERIOR
AddStaticVehicle(576,2228.2075,-1162.9020,25.4755,88.9719,-1,-1); // LS - Jeffo1
AddStaticVehicle(566,2216.9023,-1166.3242,25.4342,88.5275,-1,-1); // LS - Jeffo2
AddStaticVehicle(412,2205.3872,-1157.1360,25.5754,90.6576,27,1); // Jeffo3
AddStaticVehicle(412,2218.0481,-1170.3824,25.5646,269.0656,27,1); // Jeffo4
return 1;
}
Now, someone said, under the OnPlayerSpawn, to set
SetPlayInterior in that bracket
public OnPlayerSpawn(playerid)
{
return 1;
}
my question, how do i get it to spawn inside.
:ps: the {code} thing, messes up the scripts, so, dont worry, there not like that
-Hayden
-
do this in OnGameModeInt:
AddPlayerClass(188,2247.9373,-1163.9312,1029.7969,5.2074,0,0,0,0,0,0); // JeffoINT1
and OnPlayerSpawn
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid, 15);
SetPlayerPos(playerid,2247.9373,-1163.9312,1029.7969);
return 1;
}
~ the spawn interior is set the moment the player spawns, as well as the coordinates, they match up to spawn in the hotel
and!:
(http://i233.photobucket.com/albums/ee139/Douja-101/sa-mp-003.png) <<< outcome
-
Hey, Thanks alot dogmatic, i guess, none told me about
SetPlayerPos(playerid,2247.9373,-1163.9312,1029.7969);
:S
Well, thanks again
-
How you all do to get the Coordinates to use them as Spawn, Spawn cars, etc?
-
Hello Ryder,
Go into your Root GTA SA Folder, and look for somthing called SAMP Debug
SA:MP Debug Guide READ THIS BEFORE USING! (http://wiki.sa-mp.com/wiki/Debug_Guide)
it explains it all in there.
Also, This is a Great help for beginner scripters (http://wiki.sa-mp.com/index.php/Main_Page)
-
Use /save next time...
To spawn vehicles, change skins & so on, use [FS] Debug Mode by [CP]Simon
-
Ok, Wellm my major problem that im having, is my Charcater/class select screen, ive asked on SAMP Forums, and even on IRC thing, and none helped me with my problem.
Well ok, i used got the co-ordinates using /save, i did it twice, Once for the Player position, Once for the camera position.
now, i used to the 1st camera position cordinates for the setplayercamerlookat
now, they said on SAMP forums, not to use the Angle(A) Axis, so....
idk, when i set it, the camera is way high in the air overlooking east LS(about 200 feet high)
Here is the script that im using, thats screwed.
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2026.4141,-1203.0288,21.3570);
SetPlayerCameraPos(playerid, 2029.0081,-1201.9775,21.6540);
SetPlayerCameraLookAt(playerid, 2029.0081,-1201.9775,21.6540);
return 1;
}
Here are the coordinates im using(found with /save)
Player Position:
AddPlayerClass(188,2026.4141,-1203.0288,21.3570,290.3901,0,0,0,0,0,0); // PLAYERPOS
Camera Posistion:
AddPlayerClass(188,2029.0081,-1201.9775,21.6540,110.0768,0,0,0,0,0,0); // CAMERAPOS
So, wtf is going on? any idea?
-
The cam pos, is the same line as the line for the player spawn, it won't work. Search in the SA:MP forums for something relating to Setcamerapos or somthing simmilar
Dave
-
SetPlayerPos (player id, x coordinate, y coordinate, z coordinate) sets the player position
SetPlayerCamera((player id, x coordinate, y coordinate, z coordinate) sets the camera position
SetPlayerCameraLookat(player id, x coordinate, y coordinate, z coordinate) sets the point the camera looks to
In your case, you have the camera position equal to the look at, the camera looks at itself. Change the coordinates to the player coordinates and the result will be better.
-
W00t!! i was close with the camera pos :D :D
-
SetPlayerPos(playerid, 2026.4141, -1203.0288, 21.3570);
SetPlayerCameraPos(playerid, 2029.0081, -1201.9775, 21.6540);
SetPlayerCameraLookAt(playerid, 2026.4141, -1203.0288, 21.3570);
~ SetPlayerCameraLookAt should have the same coordinates as SetPlayerPos
(http://i233.photobucket.com/albums/ee139/Douja-101/sa-mp-001.png) <<< maybe with different skin
-
Also, can we sticky this topic(possibly, and title it "Need Scripting help? ask here")
ok, i got a question, since i have no idea how to make teams.
AddPlayerClass(167,2231.8018,-1177.7627,29.8044,38.2942,0,0,0,0,0,0); // JeffoINT2
ok, you have the cordinates, can you use other cordinates for different spawn points instead of making different teams?
-
Why not just make a board for scripting help, or (i hope this isn't advertising) visit www.av-clan.com/f0rum and check the Scripting section there..... :D
-
Yea, that would be, really awsome, cause Argonath Scripters can help us(i.e Andre, Dave, etc etc, and sometimes Gandalf)
-
Teams, umm...
1. static gTeam[MAX_PLAYERS];
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
#define TEAM_HOBO 0
#define TEAM_PIZZA 1
#define TEAM_TRUCKER 2
#define TEAM_CIVILIAN 3
2.public SetPlayerTeamFromClass(playerid,classid)
{
if (classid >= 0 && classid <= 1)
{
gTeam[playerid] = TEAM_HOBO;
}
else if (classid >= 2 && classid <= 2)
{
gTeam[playerid] = TEAM_PIZZA;
}
else if (classid >= 3 && classid <= 3)
{
gTeam[playerid] = TEAM_TRUCKER;
}
else if (classid >= 4 && classid <= 7)
{
gTeam[playerid] = TEAM_CIVILIAN;
}
return 1;
}
3. public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_HOBO)
{
SetPlayerColor(playerid,COLOR_GREEN);
}
else if(gTeam[playerid] == TEAM_PIZZA)
{
SetPlayerColor(playerid,COLOR_RED);
}
else if(gTeam[playerid] == TEAM_TRUCKER)
{
SetPlayerColor(playerid,COLOR_ORANGE);
}
else if(gTeam[playerid] == TEAM_CIVILIAN)
{
SetPlayerColor(playerid,COLOR_WHITE);
}
}
1. Top of Your script - You need them only once
2. This is the basic - Used so the "GM" could reconize the players status from his class. All classes start from 0, not 1.
So, if You got The first AddPlayerClass - It is 0, Second AddPlayerClass is 1, so on...
3. Here we bring the colors I gave to You in start - Just look at the examples & You will get the point :)
Read wiki.sa-mp.com, also
- Andre
-
Andre gave a better description, last post on page 1.
Without defining different teams, anyone (even at the same spawnpoint) can kill eachother and get points (I'm guessing it's a DM gamemode?), so you need to define the teams, like this:
Under #include <a_samp>
#define TEAM_teamname 0
#define TEAM_teamname 1
#define TEAM_teamname 2
teamname, for example: TEAM_RED or TEAM_BLUE
When you define teams, you can do all kinds of cool things, like "if(gTeam[playerid] == TEAM_teamname)", "SetPlayerTeamFromClass, SetPlayerToTeamColor, anti teamkilling, etc.
-
Yeah, I was just lucky to roll on the post first, but for example mine helps, Yours helps to get the basics, exactly.
I've also fixed few things, what I had flying in my head...
If You feel like needing help, ask :)
// The "SetCameraPosition"'s, I think Kapil once showed his skills at sa-mp.com forums & Found a good way to get the coordinates.
You might try with /csel (Camera Select), while using [FS] Debug Mode by Simon
-
http://argonathscriptingsupport.smfforfree4.com
is that allowed?? or is it against the rules? :neutral: , i thought it would come in pretty handy for some people here. If it is allowed, could all knowlegeable scripters please contact me in forums by PM.....
Dave
-
ok, Well, im scripting all day, and im in my server to test stuff, and i go out for about 4 hours, i get back, and i cant acess my server through the internet...
i cant even see it on my favorites list, all it says is Retriving info.....
i can play it on LAN, but, idk, this is pissing me off, realllly bad...
any suggestions?
-
Probably Your internet cut off while You wasn't looking.
1) Try remaking the internet settings You had before this happent
2) Close server console & re run it in case You haven't yet. May be caused if You haven't shut it after there was a connection lost
-
http://argonathscriptingsupport.smfforfree4.com
is that allowed?? or is it against the rules? :neutral: , i thought it would come in pretty handy for some people here. If it is allowed, could all knowlegeable scripters please contact me in forums by PM.....
Dave
nice idea ;) im starting to learn how to script it might come in handy.
-
ok, Well, im scripting all day, and im in my server to test stuff, and i go out for about 4 hours, i get back, and i cant acess my server through the internet...
i cant even see it on my favorites list, all it says is Retriving info.....
i can play it on LAN, but, idk, this is pissing me off, realllly bad...
any suggestions?
Try adding 127.0.0.1 in your favorites, or adding 'announce 1' in server.cfg
-
Yes, that work's, cause its my LAN, but, even if i have it on 127.0.0.1 with announce 1 on, will others be able to connect?
Posted on: November 24, 2007, 09:07:15 PM
Yes, that work's, cause its my LAN, but, even if i have it on 127.0.0.1 with announce 1 on, will others be able to connect?
-
Yes, that work's, cause its my LAN, but, even if i have it on 127.0.0.1 with announce 1 on, will others be able to connect?
Yes, but they will have to connect through your external IP.
-
that dosent work(i guess)
Anyways. the problem was, that when my internet shut down for a quick second, it change my IP from XXX.XXX.XXX.100 to XXX.XXX.XXX.103
So, all i did was close the old port, and reopen the new one
So, thanks you guys
Oh Also, Andre, idk if you will hate me for this, but i modified your weapon FS, i added guns & cool stuff(i still give you full credits though)
-
I hate You
Good job :)
-
ok mine doesnt connect :)... Help :P ive forwarded ports...