why it don't show my char?
#1

Hello i Why my character wont' show when i use this
pawn Код:
SetPlayerCameraPos(playerid,241.92,2099.91,197.22);
it shows this Only

i want tit show my Char also how to fix it?
Reply
#2

have you done on gamemodeint() part ?
Reply
#3

SetCameraBehindPlayer(playerid); also won't work
Reply
#4

You need to use SetPlayerPos also. You can't use SetCameraBehindPlayer in class selection (AFAIK).
Reply
#5

pawn Код:
SetPlayerPos(playerid,237.6745,2100.2617,188.7364);
Well... i know that
Reply
#6

Show your whole OnPlayerRequestClass code, as well as any functions called from that (i.e. SetupPlayerClassSelection)
Reply
#7

Make sure you did it right

UPDATE:

Steps to make it right.

1.)Make new one (go ingame)
2.)Goto position where player will be pos (then use /save GuySelectSkin
3.)Now goto position where camera will be pos (then use /save Camera)
4.)Now go to My Documents>SAMP>savedpositions.txt (Find GuySelectSkin and Camera)

Let me explain you something about getting the coordinates of your /save

pawn Код:
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
now its time to script something

5.)Open your GM now go to OnPlayerRequestClass:

pawn Код:
//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
i hope you did it right
Reply
#8

pawn Код:
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;
}
pawn Код:
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;
}
Reply
#9

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.
Reply
#10

Quote:
Originally Posted by MP2
Посмотреть сообщение
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.
Why remove TextDrawSetString? i got Textdraws.... if i remove it my textdraw don't appears..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)