SA-MP Forums Archive
A glitch [+rep for helper.] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A glitch [+rep for helper.] (/showthread.php?tid=466950)



A glitch [+rep for helper.] - Bek_Loking - 30.09.2013

http://pastebin.com/iFjFpFFR

So this is my script.
I've got a problem that I'm trying to fix over 5 hours and I don't succeed at all.
So here's the problem.
I enter the server, I get the pm that I need to read the rules, help, cmds and stuff and then I need to choose my team, of course I go as a spectator to Red County. As I choose the team I should be teleported to choose class, at least I think I made the script like that. But I don't I just stay there as a spectator in Red County and nothing happens, all cmds work. can somebody help me?


Re: A glitch [+rep for helper.] - Bek_Loking - 30.09.2013

Help, anybody!?


Re: A glitch [+rep for helper.] - Bek_Loking - 30.09.2013

Nobody wants to help me .-.


Re: A glitch [+rep for helper.] - Reynolds - 30.09.2013

You need to set the camera behind the player after you set it away from him.

You need to add

Код:
SetCameraBehindPlayer(playerid);
to the beginning of OnPlayerSpawn();


Re: A glitch [+rep for helper.] - matyi10012 - 30.09.2013

Just a suggestion
Код:
public OnPlayerSpawn(playerid)
{
    if(gPlayerClass[playerid] == GROVE) 
    {
        SetPlayerPos(playerix, FLOAT:X, FLOAT:Y, FLOAT:Z);
        SetPlayerFacingAngle(palyerid, FLOAT:ANGLE);
        SetCameraBehindPlayer(playerid);
        TogglePlayerControllable(playerid, 1);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid, 31, 1000);//m4
        GivePlayerWeapon(playerid, 25, 1000);//mp5
        GivePlayerWeapon(playerid, 24, 7000);//deagle
    }



Re: A glitch [+rep for helper.] - Bek_Loking - 30.09.2013

Reynolds and that's all I've got to do?


Re: A glitch [+rep for helper.] - Bek_Loking - 30.09.2013

It didn't fix the bug. The bug is still there.


Re: A glitch [+rep for helper.] - Bek_Loking - 30.09.2013

Tried everything and matyi10012's fix and Reynold's fix. Doesn't work


Re: A glitch [+rep for helper.] - Scrillex - 30.09.2013

This one is correct SetCameraBehindPlayer(playerid); and you need to spawn player after dialog...


Re: A glitch [+rep for helper.] - Jefff - 30.09.2013

1. You are using dialogid 999 in ShowPlayerDialog(playerid, 999, and then if you choose a class dialogid is not if(dialogid == DIALOG_TEAM)

2. You need SetPlayerPos for each team and SetSpawnInfo or SetPlayerSkin?