house help
#5

This should work:

pawn Код:
public OnPlayerSpawn(playerid)
{
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);

    SetPlayerAttachedObject(playerid, 3, 1609, 2); //Attach a turtle to the playerid's head, in slot 3
    // example of using colors on an object being attached to the player:
    SetPlayerAttachedObject(playerid, 3, 19487, 2, 0.101, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1, 0xFF00FF00);

    PlayerInfo[playerid][SpawnDance] = true; //to not execute to much timers
    KillTimer( PlayerInfo[playerid][SpawnTimer] ); //to kill it, since its useless now
    PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0); // (blank sound) to shut the music up
    SetCameraBehindPlayer(playerid); //to prevent some bugs


    new houseid = Player[playerid][Houseid];
    if(Player[playerid][Spawn] == 1 && houseid != 999)
    {
        SetPlayerPos(playerid,Player[playerid][SpawnX],Player[playerid][SpawnY],Player[playerid][SpawnZ]);
        SetPlayerInterior(playerid,Player[playerid][SpawnInt]);
        SetPlayerVirtualWorld(playerid,Player[playerid][SpawnVW]);
    }
    return 1;
}
Reply


Messages In This Thread
house help - by Smokey99 - 08.07.2014, 02:43
Re: house help - by ABKPot - 08.07.2014, 03:05
Re: house help - by nmader - 08.07.2014, 03:11
Re: house help - by Smokey99 - 08.07.2014, 03:42
Re: house help - by ABKPot - 08.07.2014, 04:18
Re: house help - by Smokey99 - 08.07.2014, 04:29
Re: house help - by ABKPot - 08.07.2014, 05:22
Re: house help - by Smokey99 - 09.07.2014, 04:15
Re: house help - by ABKPot - 09.07.2014, 04:56
Re: house help - by Smokey99 - 09.07.2014, 20:29

Forum Jump:


Users browsing this thread: 1 Guest(s)