new BankEntrance;
new BankExit;
new BankSystem;
public OnPlayerSpawn(playerid)
{
if(PosX[playerid] !=0 && PosY[playerid] !=0 && PosZ[playerid] !=0 && Angle[playerid] != 0)
{
SetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]);
SetPlayerFacingAngle(playerid,Angle[playerid]);
SetPlayerInterior(playerid,Interior[playerid]);
SetPlayerVirtualWorld(playerid,VirtualWorld[playerid]);
}
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
BankEntrance = CreateDynamicCP(2435.2395,1655.4387,10.8203,1.0,-1,-1,-1,40.0);
BankExit = CreateDynamicCP(2304.7026,-16.1553,26.7422,1.0,-1,-1,-1,40.0);
BankSystem = CreateDynamicCP(2316.5315,-10.0041,26.7422,1.0,-1,-1,-1,40.0);
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == BankEntrance)
{
SetPlayerPos(playerid,2307.9602,-15.7342,26.7496);
SetPlayerFacingAngle(playerid,270.5396);
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');
format(str, sizeof(str), "* %s has entered Bank of Downtown Roleplay.", pname);
ProxDetector(30.0, playerid, str, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE);
}
if(checkpointid == BankExit)
{
SetPlayerPos(playerid,2435.1694,1652.7235,10.8203);
SetPlayerFacingAngle(playerid,182.1696);
SetPlayerInterior(playerid,0);
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');
format(str, sizeof(str),"* %s has exited the building.",pname);
ProxDetector(30.0, playerid, str, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE, COLOR_MEDIUMPURPLE);
}
if(checkpointid == BankSystem)
{
ShowPlayerDialog(playerid,DIALOG_BANK,DIALOG_STYLE_LIST,""COL_BLUE"Downtown Roleplay bank system","Deposit\nWithdraw","Choose","Cancel");
}
}
BankEntrance = CreateDynamicCP(2435.2395,1655.4387,10.8203,1.0,-1,-1,-1,40.0);
BankExit = CreateDynamicCP(2304.7026,-16.1553,26.7422,1.0,-1,-1,-1,40.0);
BankSystem = CreateDynamicCP(2316.5315,-10.0041,26.7422,1.0,-1,-1,-1,40.0);
Working... that's so stupid every thread about dynamiccp where saying to put them under onplayerspawn ... well thanks +rep
|