SA-MP Forums Archive
2 SIMPLE questions: - 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: 2 SIMPLE questions: (/showthread.php?tid=317986)



2 SIMPLE questions: - Gooday - 13.02.2012

So:
1:How i can spawn someone at the hospital when die:

If i die i got spawned at the normal spawnpoint how i can have another spawn when someone die?

2: I would like to make a command: /Showme who shows your marker to all the skins id n*50 than after 5 mins remove it automatically.

Thanks +REP!


Re: 2 SIMPLE questions: - Cameltoe - 13.02.2012

This is not the request section.

Refer to https://sampforum.blast.hk/showthread.php?tid=187229 to request scripts.


Re: 2 SIMPLE questions: - Gooday - 13.02.2012

I didnt request i asked how to make...

Quote:

How i can




Re: 2 SIMPLE questions: - RicaNiel - 13.02.2012

When he die
try putting

OnPlayerDeath
pawn Код:
SetSpawnInfo
like this

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        SetSpawnInfo(playerid,?,?,?,?,?,?,?, and etc.); // Put the hospital location
        SpawnPlayer(playerid);
    return 1;
}



Re: 2 SIMPLE questions: - Twisted_Insane - 13.02.2012

You need to get the co-ordinates for the hospital!

Under:

PHP код:
public OnPlayerDeath
{
    
SetPlayerPos(playeridX,Y,Z);
    
SetPlayerInterior(playerid6);
   
SpawnPlayer(playerid);
return 
1;

Well, couldn't find the co-ordinates for the hospital! Go in the Debug and find the co-ordinates, it's near the skate park!
This link would maybe help ya:

https://sampwiki.blast.hk/wiki/Interiors

@Rica
No, SetSpawnInfo wouldn't solve his problem! We don't wanna get the info, we wanna set the info!

To the second question: I didn't get you really...


Re: 2 SIMPLE questions: - iggy1 - 13.02.2012

For your first problem if you want someone to spawn at a hospital, you just set a var then check for it in OnPlayerSpawn.

pawn Код:
new bool:gHospitalSpawn[MAX_PLAYERS];

//where you need it

gHospitalSpawn[playerid] = true;

//OnPlayerSpawn
if(gHospitalSpawn[playerid])
{
    SetPlayerPos(playerid, x, y, z);//put hospital co-ords here (set interior if needed)
}
I can't be bothered writing the command for you.


Re: 2 SIMPLE questions: - Cameltoe - 13.02.2012

Quote:
Originally Posted by iggy1
Посмотреть сообщение
For your first problem if you want someone to spawn at a hospital, you just set a var then check for it in OnPlayerSpawn.

pawn Код:
new bool:gHospitalSpawn[MAX_PLAYERS];

//where you need it

gHospitalSpawn[playerid] = true;

//OnPlayerSpawn
if(gHospitalSpawn[playerid])
{
    SetPlayerPos(playerid, x, y, z);//put hospital co-ords here (set interior if needed)
}
I can't be bothered writing the command for you.
You are right, though i would suggest using SetSpawnInfo(playerid,?,?,?,?,?,?,?, and etc.); // Put the hospital location as RicaNiel wrote earlier. It would prevent the "spawn lag".


Re: 2 SIMPLE questions: - Gooday - 13.02.2012

Anyone know the second? :/


Re: 2 SIMPLE questions: - iggy1 - 13.02.2012

Could you explain a bit better please (for me if not anyone else) what do you mean by "n*50"?


Re: 2 SIMPLE questions: - Gooday - 13.02.2012

So, I made a 911 call command all works fine but sometimes the cops cant find the caller because he didnt wrote the location so. I would like to show at the skin ID 50 a red marker in the location of the call and remove it automatically after 5 minutes, create a checkpoint (RED CIRCLE) at the location, just the Skin ID50 can see it and by a command /REMOVEMarker (when he is arrived) can remove it.