public OnPlayerRequestClass(playerid, classid)
{
new Float:x, Float:y, Float:z;
SetPlayerPos(playerid, 5.0, 5.0, 5.0);
GetPlayerPos(playerid, x, y, z); printf("%f %f %f", x, y, z);
return 1;
}
Originally Posted by Flashy
You canґt put SetPlayerPos and GetPlayerPos in same time xDD
|
enum E_CLASS_DATA
{
SkinID,
Float:PlayerPosX,
Float:PlayerPosY,
Float:PlayerPosZ,
Float:PlayerPosA,
Float:SpawnX,
Float:SpawnY,
Float:SpawnZ,
Float:SpawnA,
Float:CamPosX,
Float:CamPosY,
Float:CamPosZ,
Text[128],
}
new cData[][E_CLASS_DATA] =
{
{105, 2457.687500, -1677.946533, 13.504999, 67.715721, 2495.215332, -1686.504882, 13.513961, 4.950347, 2454.773437, -1676.751342, 13.502408, "~n~~n~~g~Grove Street"},
{106, 2457.687500, -1677.946533, 13.504999, 67.715721, 2495.215332, -1686.504882, 13.513961, 4.950347, 2454.773437, -1676.751342, 13.502408, "~n~~n~~g~Grove Street"},
{107, 2457.687500, -1677.946533, 13.504999, 67.715721, 2495.215332, -1686.504882, 13.513961, 4.950347, 2454.773437, -1676.751342, 13.502408, "~n~~n~~g~Grove Street"}
};
public OnGameModeInit()
{
for(new g; g < sizeof(cData); g++)
{
AddPlayerClass(cData[g][SkinID], cData[g][SpawnX], cData[g][SpawnY], cData[g][SpawnZ], cData[g][SpawnA], 0, 0, 0, 0, 0, 0);
return 1;
}
return 1;
}
stock ClassSelection(playerid)
{
for(new g; g < sizeof(cData[]); g++)
{
SetPlayerPos(playerid, cData[g][PlayerPosX], cData[g][PlayerPosY], cData[g][PlayerPosX]);
SetPlayerFacingAngle(playerid, cData[g][PlayerPosA]);
SetPlayerCameraPos(playerid, cData[g][CamPosX], cData[g][CamPosY], cData[g][CamPosZ]);
SetPlayerCameraLookAt(playerid, cData[g][PlayerPosX], cData[g][PlayerPosY], cData[g][PlayerPosZ]);
GameTextForPlayer(playerid, cData[g][Text], 3000, 4);
}
}
public OnPlayerRequestClass(playerid, classid)
{
ClassSelection(playerid);
}