Strange Problem | Clanwar Script - 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: Strange Problem | Clanwar Script (
/showthread.php?tid=88688)
Strange Problem | Clanwar Script -
(UvH)bLacKhAwK - 28.07.2009
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~
Re: Strange Problem | Clanwar Script -
Gappy - 28.07.2009
The easiest fix would to just SetPlayerHealth(playerid, 100) when they enter the arena.
Re: Strange Problem | Clanwar Script -
(UvH)bLacKhAwK - 28.07.2009
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;
}
Re: Strange Problem | Clanwar Script -
Gappy - 28.07.2009
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.
Re: Strange Problem | Clanwar Script -
(UvH)bLacKhAwK - 28.07.2009
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
Re: Strange Problem | Clanwar Script -
Gappy - 28.07.2009
It must be something else in your script causing it because those commands are fine.
Re: Strange Problem | Clanwar Script -
(UvH)bLacKhAwK - 28.07.2009
do ya have icq/msn/xfire, than i could send the file, dont want to shot the whole code here...
Re: Strange Problem | Clanwar Script -
(UvH)bLacKhAwK - 30.07.2009
no one an idea ?