Spawnkill system not working
#1

I added this under definses:
pawn Код:
forward SpawnKill(playerid);
i added this under OnPlayerSpawn:
pawn Код:
SetPlayerHealth(playerid,99999);
        SetTimerEx("SpawnKill",10000,0,"i",playerid);
I added this under the stock
pawn Код:
public SpawnKill(playerid)
{
    SetPlayerHealth(playerid,100.0);
    SendClientMessage(playerid,red,"SpawnKill Over!");
    return 1;
}
But somehow the timer or something doesn't work
Because the health keep unlimited
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid, 100000.0);
    SetTimerEx("AntiSpawnkill",5000,0,"i",playerid);
    return 1;
}


forward AntiSpawnkill(playerid);
public AntiSpawnkill(playerid)
{
    SetPlayerHealth(playerid, 100.0);  
    return 1;
}
Reply
#3

pawn Код:
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(466) : error 055: start of function body without function header
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(467) : error 021: symbol already defined: "SetPlayerHealthEx"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(469) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Reply
#4

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid, 100000.0);
    SetTimerEx("AntiSpawnkill",5000,0,"i",playerid);
    return 1;
}


forward AntiSpawnkill(playerid);
public AntiSpawnkill(playerid)
{
    new Float:health;
    GetPlayerHealth(playerid,health);
    if (health == 100000.0)
    {
        SetPlayerHealth(playerid, 100.0);
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by Biess
Посмотреть сообщение
pawn Код:
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(466) : error 055: start of function body without function header
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(467) : error 021: symbol already defined: "SetPlayerHealthEx"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(469) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
This timer works fine, those errors are from your GM/FS.
Reply
#6

Quote:
Originally Posted by Biess
Посмотреть сообщение
pawn Код:
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(466) : error 055: start of function body without function header
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(467) : error 021: symbol already defined: "SetPlayerHealthEx"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(469) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
show script that contains error also mention its line number in script

This forum requires that you wait 120 seconds between posts. Please try again in 65 seconds.
Reply
#7

pawn Код:
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(467) : warning 225: unreachable code
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
pawn Код:
{
    SetPlayerHealth(playerid, 100000.0);
    SetTimerEx("AntiSpawnkill",5000,0,"i",playerid);
    return 1;
}


PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);

    GangZoneShowForAll(GZ_ZONE1, 0x80FFFF96);
    GangZoneShowForAll(GZ_ZONE2, 0x80FF803E);
    GangZoneShowForAll(GZ_ZONE3, 0xFF00003E);
    GangZoneShowForAll(GZ_ZONE4, 0x0000A03E);
    GangZoneShowForAll(GZ_ZONE5, 0x8000803E);
    return 1;
}
the warning is caused by playsound i dont know if i added it right and it still doesn't work
Reply
#8

pawn Код:
{
    SetPlayerHealth(playerid, 100000.0);
    SetTimerEx("AntiSpawnkill",5000,0,"i",playerid);
    PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
    GangZoneShowForAll(GZ_ZONE1, 0x80FFFF96);
    GangZoneShowForAll(GZ_ZONE2, 0x80FF803E);
    GangZoneShowForAll(GZ_ZONE3, 0xFF00003E);
    GangZoneShowForAll(GZ_ZONE4, 0x0000A03E);
    GangZoneShowForAll(GZ_ZONE5, 0x8000803E);
    return 1;
}
Reply
#9

get lots of errors than.
Reply
#10

PM ME YOUR TEAM VIEWER ID AND PASS MAY BE I CAN HELP YOU OVER THAT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)