Strange Problem | Clanwar Script
#1

Hai guys,

I wanted to code a clanwar script for a friend. Nearly everything works except 1 thing. sometimes theres a healthbug in it, that means, if u want to join the clanwar arena you're gettin' godmode and no one can kill you and you can kill no one. thats a strange problem because i didn't used a godmode in my script, so i dont know wheres the mistake to show you the lines...

please help,

ThiaZ~
Reply
#2

The easiest fix would to just SetPlayerHealth(playerid, 100) when they enter the arena.
Reply
#3

pawn Код:
dcmd_team1(const playerid,const params[])
{
    #pragma unused params
    if(cw == 1)
    {
        gTeam[playerid] = CWTEAM1;
        SetPlayerColor(playerid, 0xFFFF00FF);
          SetPlayerHealth(playerid, 100); //already done
        SetPlayerPos(playerid, -1347.8940,-88.6851,14.1462);
        SetPlayerFacingAngle(playerid, 230);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid, 26, 10000);
        GivePlayerWeapon(playerid, 28, 10000);
        new join[256];
        new playerjoin[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playerjoin, sizeof (playerjoin));
        format(join, sizeof(join), "%s has joined Team1 ("#NAMETEAM1") ('/team1')", playerjoin);
        SendClientMessageToAll(dmcolor, join);
    }
    else
    {
      SendClientMessage(playerid, playerinfo, "The Clanwar isn't started yet.");
    }
    return 1;
}

dcmd_team2(const playerid,const params[])
{
    #pragma unused params
    if(cw == 1)
    {
        gTeam[playerid] = CWTEAM2;
        SetPlayerColor(playerid, 0xFF1111FF);
          SetPlayerHealth(playerid, 100); //already done
        SetPlayerPos(playerid, -1248.5560,-187.9807,14.1484);
        SetPlayerFacingAngle(playerid, 50);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid, 26, 10000);
        GivePlayerWeapon(playerid, 28, 10000);
        new join[256];
        new playerjoin[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playerjoin, sizeof (playerjoin));
        format(join, sizeof(join), "%s has joined Team2 ("#NAMETEAM2") ('/team2')", playerjoin);
        SendClientMessageToAll(dmcolor, join);
    }
    else
    {
      SendClientMessage(playerid, playerinfo, "The Clanwar isn't started yet.");
    }
    return 1;
}

Reply
#4

Well your code looks fine to me. Wouldn't have a clue what is causing your godmode bug, oh and btw you can change your join string down to 128 to save memory.
Reply
#5

Quote:
Originally Posted by Gappy
Well your code looks fine to me. Wouldn't have a clue what is causing your godmode bug, oh and btw you can change your join string down to 128 to save memory.
Oh thanks :O

but well, i even dont know where the problem is now...

//tested it 2 mins ago and only me (id0) had godmode
Reply
#6

It must be something else in your script causing it because those commands are fine.
Reply
#7

do ya have icq/msn/xfire, than i could send the file, dont want to shot the whole code here...
Reply
#8

no one an idea ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)