public OnPlayerSpawn(playerid)
{
if(MAP == 0) // Default map(RC Battlefield)
{
SetPlayerInterior(playerid,10);
}
else if(MAP == 1) // Jefferson Motel
{
SetPlayerInterior(playerid,15);
if(GetPlayerTeam(playerid) == 1)
{
SetPlayerPos(playerid,2217.5869,-1151.1071,1025.7969);
SetPlayerFacingAngle(playerid,272.2993);
}
else if(GetPlayerTeam(playerid) == 2)
{
SetPlayerPos(playerid,2195.3025,-1143.9893,1029.7969);
SetPlayerFacingAngle(playerid,181.1184);
}
}
else if(MAP == 2) //Liberty City
{
SetPlayerInterior(playerid,1);
if(GetPlayerTeam(playerid) == 1)
{
SetPlayerPos(playerid,-795.0522,495.1387,1376.1953);
SetPlayerFacingAngle(playerid,356.2731);
}
else if(GetPlayerTeam(playerid) == 2)
{
SetPlayerPos(playerid,-830.9671,515.4208,1357.6854);
SetPlayerFacingAngle(playerid,182.6851);
}
}
else if(MAP == 3) //Pleasure Domes
{
SetPlayerInterior(playerid,3);
if(GetPlayerTeam(playerid) == 1)
{
SetPlayerPos(playerid,-2647.0217,1423.9025,906.4609);
SetPlayerFacingAngle(playerid,127.1440);
}
else if(GetPlayerTeam(playerid) == 2)
{
SetPlayerPos(playerid,-2667.2332,1426.8282,906.4609);
SetPlayerFacingAngle(playerid,179.7845);
}
}
else if(MAP == 4) // Planning Department
{
SetPlayerInterior(playerid,3);
if(GetPlayerTeam(playerid) == 1)
{
SetPlayerPos(playerid,349.0134,163.6172,1025.7891);
SetPlayerFacingAngle(playerid,271.4312);
}
else if(GetPlayerTeam(playerid) == 2)
{
SetPlayerPos(playerid,-372.1458,180.4995,1008.3828);
SetPlayerFacingAngle(playerid,179.8669);
}
}
SetPlayerHP(playerid,100.0);
SPAWNED[playerid] = 1;
return 1;
}
I have some maps which i want to play on,but because of this I am unable to...
PHP код:
|
No Problem,I want to remove Interiors and make it to load maps from filterscripts,any idea how?
|
Just add the objects to a filterscript and then remove the 'SetPlayerInterior' on your main code.
|
What are you trying to do and how are you trying to do it? Your explanation is weird, you want to spawn at the location provided by the filterscript?
What is this filterscript you want to use? |
You could comment out all the functions under OnPlayerSpawn to see if it compiles that way, if so, then you can add your own spawn locations and so on.
Trace the variables used under OnPlayerSpawn and delete these functions so it wont be buggy afterwards. |