SA-MP Forums Archive
Spawning giving rep - 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: Spawning giving rep (/showthread.php?tid=479192)



Spawning giving rep - iBots - 03.12.2013

i have made a command to change the spawn and i have fixed the previous bug and it works and it sets the player in his house level but if u do /exit it doesnt work can someone help?


Re: Spawning giving rep - Brandon_More - 03.12.2013

Dude, there needs to be atleast a-bit of code to get support.


Re: Spawning giving rep - SilentSoul - 03.12.2013

Show us the /exit codes please!


Re: Spawning giving rep - iBots - 03.12.2013

Spawn thing:
pawn Код:
else if(PlayerInfo[playerid][pSpawn] == 2)
                {
                    if(PlayerInfo[playerid][pHouseLevel] == 2)
                    {
                        SetPlayerFacingAngle(playerid, 270.0000);
                        SetPlayerInterior(playerid, 2);
                        PutPlayerInHouse(playerid, PlayerInfo[playerid][pHouseLevel]);
                        PlayerInfo[playerid][pInt] = 2;
                    }
                }
the House thing under /exit:
pawn Код:
if(PlayerInfo[playerid][pLocal] != 999) //in house
                {
                    if(IsAtHouseExit(playerid))
                    {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "* %s has left the house.", sendername);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid,0);
                        SetPlayerPos(playerid,PlayerInfo[playerid][pHouseExitX],PlayerInfo[playerid][pHouseExitY],PlayerInfo[playerid][pHouseExitZ]);
                        SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pHouseExitR]-180);
                        SetCameraBehindPlayer(playerid);
                        PlayerInfo[playerid][pInt] = 0;
                        PlayerInfo[playerid][pVirtualWorld] = 0;
                        PlayerInfo[playerid][pLocal] = 999;
                    }
                }



Re: Spawning giving rep - Brandon_More - 03.12.2013

Add on to spawn:

pawn Код:
PlayerInfo[playerid][pLocal] = 1; // Or W.E.



Re: Spawning giving rep - iBots - 03.12.2013

Quote:
Originally Posted by Brandon_More
Посмотреть сообщение
Add on to spawn:

pawn Код:
PlayerInfo[playerid][pLocal] = 1; // Or W.E.
It doesnt work ,well if you are not in a house ur local will be 999 and if ur inside a house in my gamemode it's "i" i have tried to do PlayerInfo[playerid][pLocal] = i;
It doesnt work too, will it work if i put:
PlayerInfo[playerid][pLocal] != 999; ?


Re: Spawning giving rep - iBots - 03.12.2013

Bump