23.01.2011, 03:27
i have the same problem on https://sampforum.blast.hk/showthread.php?tid=213777.
but when i changed the wrong code to"if (classid == 117 || classid == 118 || classid == 124)",
i found that the problem's still here.
e.g.i choose the team(2) class ,i still spawn in team(1)'s area.
please help me,thank you.
here's the code:
but when i changed the wrong code to"if (classid == 117 || classid == 118 || classid == 124)",
i found that the problem's still here.
e.g.i choose the team(2) class ,i still spawn in team(1)'s area.
please help me,thank you.
here's the code:
Код:
new Float:gNewbeyondSpawns[][4] ={ {2460.3081,-1715.6678,13.5400,177.4539}, {2447.0830,-1689.2539,13.5199,128.7327}, {2461.2871,-1637.8500,13.4250,30.0109}, {2478.2070,-1642.8694,13.4509,1.9073}, {2513.5608,-1638.6272,14.1400,313.5020}, {2525.1946,-1650.8152,14.4580,318.7791}, {2538.5913,-1668.5663,15.1574,266.6921}, {2530.6399,-1689.8724,13.8194,252.4563}, {2522.5918,-1700.5239,17.8584,44.4754}, {2493.7568,-1694.5708,23.4752,177.7178}}; new Float:g400KSpawns[][4] = { {305.1188,-1762.3278,7.6797,27.0282}, {261.3995,-1760.3229,12.4531,35.2505}, {308.7643,-1766.8494,4.5174,353.8223}, {268.7165,-1766.8572,4.7485,65.4644}, {364.4940,-1880.8068,2.6224,148.3876}, {393.3870,-1830.1184,14.7333,263.1954}, {383.5261,-1887.0420,7.8301,227.5352}, {369.6404,-2057.2927,14.6597,185.1653} }; new gTeam[MAX_PLAYERS];
Код:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid,2490.6401,-1669.4882,13.3359); SetPlayerCameraPos(playerid,2496.6401,-1669.4882,13.3359); SetPlayerCameraLookAt(playerid,2490.6401,-1669.4882,13.3359); return 1; }
Код:
SetPlayerTeamFromClass(playerid, classid) { if (classid == 117 || classid == 118 || classid == 124) { gTeam[playerid] = TEAM_NEWBEYOND; } else if (classid == 138 || classid == 139 || classid == 140) { gTeam[playerid] = TEAM_400K; }
Код:
public OnPlayerSpawn(playerid) { SetPlayerToTeamColor(playerid); if(gTeam[playerid] = TEAM_NEWBEYOND) { new newbeyondspawn; newbeyondspawn = random(sizeof(gNewbeyondSpawns)); SetPlayerPos(playerid,gNewbeyondSpawns[newbeyondspawn][0],gNewbeyondSpawns[newbeyondspawn][1],gNewbeyondSpawns[newbeyondspawn][2]); SetPlayerFacingAngle(playerid,gNewbeyondSpawns[newbeyondspawn][3]); SetPlayerInterior(playerid, 18); SetPlayerHealth(playerid,100.0); SetPlayerArmour(playerid,200.0); GivePlayerMoney(playerid,1000); } else { new fkspawn; fkspawn = random(sizeof(g400KSpawns)); SetPlayerPos(playerid,g400KSpawns[fkspawn][0],g400KSpawns[fkspawn][1],g400KSpawns[fkspawn][2]); SetPlayerFacingAngle(playerid,g400KSpawns[fkspawn][3]); SetPlayerInterior(playerid, 18); SetPlayerHealth(playerid,100.0); SetPlayerArmour(playerid,200.0); GivePlayerMoney(playerid,1000); } return 1; }