13.03.2017, 09:16
I have some maps which i want to play on,but because of this I am unable to...
How can I change it to load the map file in Filterscripts?
PHP код:
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;
}