[Help] Dm spawn codding. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Dm spawn codding. (
/showthread.php?tid=111200)
[Help] Dm spawn codding. -
SavageTR - 30.11.2009
Ex : I died in /Dm1. I want to respawn in /dm1. And I written this codes :
First
Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
enum pInfo
{
Area,
};
OnPlayerConnect
Код:
PlayerInfo[playerid][Area] = 0;
OnPlayerCommandText
Код:
if(!strcmp(cmdtext,"/dm1",true)) {
PlayerInfo[playerid][Area] = 1;
SetPlayerPos(playerid, 1653.2175,2409.2781,10.9262);
return 1;
}
-------OnPlayerDeath---------
Код:
if(PlayerInfo[playerid][Area] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "[Dm-1]");
GivePlayerWeapon(playerid,32,250);
GivePlayerWeapon(playerid,26,250);
GivePlayerWeapon(playerid,22,250);
GivePlayerWeapon(playerid,31,250);
SetPlayerPos(playerid, 1653.2175,2409.2781,10.9262);
}
I haven't warning(Compiled). Later, I died in /dm1. I teleport /dm1 in first.
Help me please.
Sorry, My English is not bad (
)
Thanks...
Re: [Help] Dm spawn codding. -
Remi-X - 30.11.2009
Place your code from OnPlayerDeath into OnPlayerSpawn.
Re: [Help] Dm spawn codding. -
SavageTR - 30.11.2009
Quote:
Originally Posted by Remi-X
Place your code from OnPlayerDeath into OnPlayerSpawn.
|
No :S
Re: [Help] Dm spawn codding. -
xxmitsu - 30.11.2009
I think that you could do it with a zone system like
this
Create zones and check whatever a player is in a zone with OnPayerDeath or PLAYER_STATE_WASTED with
Код:
PlayerInfo[playerid][Area] = getPlayerZoneID(playerid) ;
then on
Код:
OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][Area] == x) SetPlayerPos(playerid, 1653.2175,2409.2781,10.9262);
}
Re: [Help] Dm spawn codding. -
Doppeyy - 30.11.2009
Quote:
Originally Posted by SavageTR
Quote:
Originally Posted by Remi-X
Place your code from OnPlayerDeath into OnPlayerSpawn.
|
No :S
|
Remi-X just tried to help you ? if you say no then people wont help you anymore.
So think before you say something.
/Artix
Re: [Help] Dm spawn codding. -
SavageTR - 30.11.2009
Closed!