who can help me adding this small code thingy
#1

weґll ive posted for a respawn time thing and a guy posted this






Re: where can i find...
« Reply #1 on: Today at 12:41:45 pm » Quote

--------------------------------------------------------------------------------

Code:
public OnPlayerDeath(playerid)
{
TogglePlayerSpectating(playerid,1);
SetCameraLookAt(2000.0,129.0,34.0);
SetCameraPos(1999.0,120.0,330.0);

SetTimerEx("spawnplayer",10000,0,"i",playerid);
return 1;
}

Anywhere in the script:

Code:
forward spawnplayer(playerid);
public spawnplayer(playerid)
{
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
return 1;
}



and i dont know where to do this in my script plz help my msn is sniperskill@live.nl
Reply
#2

I dont get much of what you are trying to say?
Reply
#3

Shoot me please.

This dude couldn't even find his own topic, which is on the first page...

Ever heard of using search?

http://forum.sa-mp.com/index.php?topic=181375.0
Reply
#4

Quote:
Originally Posted by Hiddos
Shoot me please.

This dude couldn't even find his own topic, which is on the first page...

Ever heard of using search?

http://forum.sa-mp.com/index.php?topic=181375.0
[me="[XS]XtremE_"]shoots Hiddos. [/me]
Reply
#5

The first code snippet goes under OnPlayerDeath and the other one is a stand alone function which can be put at the bottom somewhere. I did specify it didn't I?

*DJDhan takes Hiddos to the Hospital. :P
Reply
#6

I can tell you exactly how it works, but, i am going to make it really - really - really easy.

What i am telling you can be changed, but if you know REALLY how it works...

I am just going to say it easily....

First of all, find a script like this in the Game Mode (or Filterscript):

pawn Код:
public OnPlayerDeath(playerid)
{
  return 1;
}
Change the whole codes (the one that i ask you to search) into a new one like this:
pawn Код:
public OnPlayerDeath(playerid)
{
  TogglePlayerSpectating(playerid,1);
  SetCameraLookAt(2000.0,129.0,34.0);
  SetCameraPos(1999.0,120.0,330.0);

  SetTimerEx("spawnplayer",10000,0,"i",playerid);
  return 1;
}
and then, get to the top of the script until you see a line like this
pawn Код:
#include <a_samp>
Add this script UNDER that line:
pawn Код:
forward spawnplayer(playerid);
public spawnplayer(playerid)
{
  SpawnPlayer(playerid);
  SetCameraBehindPlayer(playerid);
  return 1;
}
And, well done! Compile it, and you'll able to work it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)