4 Little Questions
#1

1. Is there a FS that saves all the stuff for player class selection that looks like this:

Код:
		  SetPlayerInterior(playerid,0);
		  SetPlayerPos(playerid,-228.306442,2729.432861,62.687500);
	    SetPlayerFacingAngle(playerid, 270.0);
	    SetPlayerCameraPos(playerid,-226.306442,2729.432861,62.687500);
	    SetPlayerCameraLookAt(playerid,-228.306442,2729.432861,62.687500);
2. If not, anyone have that information, only looking at the vinewood sign?

3. How would I make it say "Welcome Dustin, (IP: 192.168.0.1)."
On under on player connect.

4. And onplayerdeath, how would I make the player spawn at the hospital after hes dead?

xD, Yes, I have searched and sorry if it seems like I am spamming.
Reply
#2

Quote:
Originally Posted by DeltaAirlines12
1. Is there a FS that saves all the stuff for player class selection that looks like this:

Код:
		  SetPlayerInterior(playerid,0);
		  SetPlayerPos(playerid,-228.306442,2729.432861,62.687500);
	    SetPlayerFacingAngle(playerid, 270.0);
	    SetPlayerCameraPos(playerid,-226.306442,2729.432861,62.687500);
	    SetPlayerCameraLookAt(playerid,-228.306442,2729.432861,62.687500);
2. If not, anyone have that information, only looking at the vinewood sign?

3. How would I make it say "Welcome Dustin, (IP: 192.168.0.1)."
On under on player connect.

4. And onplayerdeath, how would I make the player spawn at the hospital after hes dead?

xD, Yes, I have searched and sorry if it seems like I am spamming.
1. try to make it using dini
2. don't know what you mean.
3. Look in the wiki : https://sampwiki.blast.hk/wiki/OnPlayerConnect, and edit it to your wishes
4. below OnPlayerDeath, setplayerpos(playerid, x, y, z); to the positions you want.

And no, it's not spamming, you could try to search better before asking, but this forum is for things like that

No problem at all
Reply
#3

1. How would we know ? We are supposed to search in the FS ?

2. I didnt understand

3. https://sampwiki.blast.hk/wiki/GetPlayerIp

4. Add this

pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
SetPlayerPos(playerid,X,Y,Z); //coords of the hospital
return 1;
}
Reply
#4

4. add a global variable called pHasDied[MAX_PLAYERS] or something like that.
then under OnPlayerDeath put
pawn Код:
pHasDied[playerid] = 1;
and under OnPlayerSpawn put
pawn Код:
if(pHasDied[playerid] == 1)
{
  SetPlayerPos(...);
  //You do the rest
  pHasDied[playerid] = 0;
}
You should also set the variable in connect and disconnect:
pawn Код:
public OnPlayerConnect(playerid)
{
  pHasDied[playerid] = 0;
  return true;
}
public OnPlayerDisconnect(playerid)
{
  pHasDied[playerid] = 0;
  return true;
}
Reply
#5

Question 2:
Код:
SetPlayerPos(playerid,X,Y,Z); (Players Possition)
SetPlayerCameraPos(playerid,X,Y,Z);(Camera witch will look on player)
SetPlayerCameraLookAt(playerid,X,Y,Z);
Question 4:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
       SendClientMessage(playerid,color,"Your medical bill will comes to 100$");
       GivePlayerMoney(playerid,-100);
       SetPlayerPos(playerid,X,Y,Z);
	return 1;
}
This is For RP Script

But this one is
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
       SetPlayerPos(playerid,X,Y,Z);
       return 1;
}
This one is for normal script

Reply
#6

THANK YOU ALL FOR YOUR REPLY'S!
Reply
#7

No problem !!!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)