Need help interiors! :( -
xeniusw - 19.05.2012
Hello, I recently started Modern Roleplay back up again with my old script, but it's been so long time since I last did anything in pawn, and I really need to know how to add an interior object, like "the arrow" at LSPD, so I can make more hq's for the factions, so if anyone can tell me how to add those it would be very appreciated, also I'm in need of a few staff members, so the first 5 players on my server will be junior administrators, if you're unsure what i'm talking about please take a look at my server. Thank you.
HostName: • Modern Roleplay v1.0b •
Address: 176.9.100.232:8350
Players: 0 / 32
Ping: 80
Mode: MRP v1.0b
Map: Los Santos
Re: Need help interiors! :( -
xeniusw - 19.05.2012
I'm desperate in help how to add those interiors I need to make them for every faction..
Re: Need help interiors! :( -
xeniusw - 20.05.2012
Really noone able to help? I'm kinda surprised.
Re: Need help interiors! :( -
[FMJ]PowerSurge - 20.05.2012
Presuming you still know how to script /enter and /exit, just add an object where you want the players to be able to /enter at.
If not, here's a 'starter kit'...
pawn Код:
if(!strcmp("/enter", cmdtext, true))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z)) // LSPD HQ (Substitute X, Y & Z)
{
SetPlayerPos(playerid, X2, Y2, Z2); // Substitute X2, Y2 & Z2 for LSPD interior
SetPlayerInterior(playerid, I); // Substitute I for interior ID
GameTextForPlayer(playerid, "~b~Los Santos Police Department", 5000, 5);
}
return 1;
}
pawn Код:
if(!strcmp(cmdtext, "/exit", true))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, X2, Y2, Z2)) // Do same as above
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, X, Y, Z);
}
return 1;
}
Re: Need help interiors! :( -
[FMJ]PowerSurge - 20.05.2012
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & 16) // VEHICLE_ENTER_EXIT (default F/Enter)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z)) // LSPD HQ (Substitute X, Y & Z)
{
SetPlayerPos(playerid, X2, Y2, Z2); // Substitute X2, Y2 & Z2 for LSPD interior
SetPlayerInterior(playerid, I); // Substitute I for interior ID
GameTextForPlayer(playerid, "~b~Los Santos Police Department", 5000, 5);
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, X2, Y2, Z2)) // LSPD interior
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, X, Y, Z);
}
return 1;
}
}
Judging by what I've seen ingame, you should be able to just add coordinates & a name to a file, though. Unsure of which one without looking at your script, but hey.
Re: Need help interiors! :( -
xeniusw - 20.05.2012
Thanks a ton, PowerSurge solved my problem.