SetPlayerCameraPos(playerid,241.92,2099.91,197.22);
SetPlayerPos(playerid,237.6745,2100.2617,188.7364);
AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); //Name of your /save
//Code below
SetPlayerPos(playerid,,Float:x, Float:y, Float:z); //replace this with your /save coordinates
SetPlayerFacingAngle(playerid,Float:z_angle); //replace this with your /save coordinates (EG. 48.908131) you will pick the 48 and put on FacingAngle
SetPlayerCameraLookAt(playerid,Float:x, Float:y, Float:z); //This is where the camera will look at. Make sure copy the correct coordinates the Example of this is GuySelectSkin
SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z); //This is where the camera position. copy the coordinates of /camera
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
if(classid == 0) {
gTeam[playerid] = Army;
GameTextForPlayer(playerid,"~g~Army Force!",3000,5);
ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid,287);
SetPlayerPos(playerid,237.6745,2100.2617,188.7364);
SetPlayerCameraPos(playerid,241.92,2099.91,197.22);
SetPlayerCameraLookAt(playerid,246.03, 1860.42,14.08);
SetPlayerColor(playerid,COLOR_GREEN);
}
else if(classid == 1) {
gTeam[playerid] = Theifs;
GameTextForPlayer(playerid,"~r~Theifs",3000,5);
SetPlayerPos(playerid,246.03,1860.42,14.08);
ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);
SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
SetPlayerSkin(playerid,285);
SetPlayerColor(playerid,COLOR_BRIGHTRED);
}
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid , Textdraw0);
TextDrawShowForPlayer(playerid , Textdraw1);
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s has joined the server", pname);
SendClientMessageToAll(COLOR_GREEN, string);
new strings[15];
TextDrawSetString(players, strings);
TextDrawShowForPlayer(playerid, players);
return 1;
}
This code makes no sense:
new strings[15]; TextDrawSetString(players, strings); TextDrawShowForPlayer(playerid, players); You should remove it. It's an empty string. Try commenting out all of your OnPlayerRequestClass code, and just use campos, camlookat and SetPlayerPos; if it works it's a problem with the conditions. |