Help Hospital
#1

I have been making a hospital sistem but i am stuck i get errors i haev this

Код:
SetPlayerPos(playerid, 2169.69995117,-2270.99951172,990.70001221);
    FreezePlayer(playerid, 2);
    switch (cmdtext[7])
    	{
        	case '1': LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    	{
	SetTimer(*Bolnica*, 60000, false);
	CekaBolnica[playerid] = 1;
	SendClientMessage(playerid, COLOR_RED, "Tesko Ste Povredeni i Ke bidnete prefrleni vo Bolnica");
I place that under the OnPlayerDeath but i get errors i have a public also made but how can make
OnPlayerDeath so only when a player kills another player he is sent in the hospital??
Reply
#2

what are the errors,
Reply
#3

I get 26 errors that aren't related to this script

here ther are

Quote:

C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1395) : error 004: function "FixHour" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(154 : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1573) : error 004: function "SendFamilyMessage" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1574) : error 004: function "SendFamilyMessage" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1575) : error 004: function "SendFamilyMessage" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1720) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1819) : error 004: function "SetPlayerToTeamColor" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1844) : error 004: function "SetPlayerToTeamColor" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1864) : error 004: function "SetPlayerCriminal" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1869) : error 004: function "SetPlayerCriminal" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1933) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1937) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1949) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1953) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1957) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1961) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1965) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1969) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1973) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1985) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1989) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1993) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(1997) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(2001) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(2013) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\User\Desktop\Server\Pawno\TESTGM~1\Dar kLife.pwn(2017) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

i don't get it why they show up

Edit:
That only happens when i add this under OnPlayerDeath
Код:
SetPlayerPos(playerid, 2169.69995117,-2270.99951172,990.70001221);
    FreezePlayer(playerid, 2);
    switch (cmdtext[7])
    	{
        	case '1': LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    	{
	SetTimer(*Bolnica*, 60000, false);
	CekaBolnica[playerid] = 1;
	SendClientMessage(playerid, COLOR_RED, "Tesko Ste Povredeni i Ke bidnete prefrleni vo Bolnica");
should i make something else and add that then ?
Reply
#4

You probably for got somewhere a "{" or "}" bracket in your script!
Reply
#5

is there a way for me to make when a player kills a player under the OnPlayerDeath and the killed player goes to the hospital ??
Reply
#6

Try this:

pawn Код:
SetPlayerPos(playerid, 2169.69995117,-2270.99951172,990.70001221);
    FreezePlayer(playerid, 2);
    switch (cmdtext[7])
        {
            case '1': LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        }
    SetTimer(*Bolnica*, 60000, false);
    CekaBolnica[playerid] = 1;
    SendClientMessage(playerid, COLOR_RED, "Tesko Ste Povredeni i Ke bidnete prefrleni vo Bolnica");
Reply
#7

PHP код:
CekaBolnica[playerid] == 1
or:

PHP код:
CekaBolnica[playerid] == true
Reply
#8

Use Guitar's one.It's correct.Instead of the closing } u put a {
Reply
#9

I finaly got it i removed the switch

Код:
//=====================================HOSPITAL====================================================
    SetPlayerPos(playerid, 2169.69995117,-2270.99951172,990.70001221);
    FreezePlayer(playerid, 2);
    SetTimer("Bolnica", 60000, false);
    CekaBolnica[playerid] = 1;
    SendClientMessage(playerid, COLOR_RED, "Tesko Ste Povredeni i Ke bidnete prefrleni vo Bolnica");
however theres another problem now after i get out of the hospital it still gives me the message You are released from the hospital over and over

here is the public also

Код:
public Bolnica(playerid)
{
	ClearAnimations(playerid);
	CekaBolnica[playerid] = 0;
	SendClientMessage(playerid, COLOR_RED, "Pusteni ste Od bolnica!");
	return 1;
}
Reply
#10

do i need to somehow kill the timer so it stops when i am released from the hospital?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)