nuclear base help -
James Coral - 30.01.2012
Hey i have problem with nuclear base
pawn Код:
dcmd_startmissle(playerid, params[])
{
#pragma unused params
if(gTeam[playerid] != TEAM_NUCLEAR)
{
new Float:x, Float:y, Float:z;
for( new i = 0; i < MAX_PLAYERS; i ++ )
{
if(IsPlayerConnected(i) && ( i != playerid) && (CanUseNUCLEAR[playerid] == 1337))
{
MoveObject(NuclearBomm, -390.69085693359,2794.9379882813,9.80140114, 209.00028991699);
CreateExplosion(-402.30023193359, 2795.8708496094, 83.068748474121, 6, 20);
SetPlayerCameraLookAt(playerid, -431.04086303711, 2755.7937011719, 0);
PlayerPlaySound(i,1190,0.0,0.0,0.0);
GetPlayerPos(i,x,y,z );
CreateExplosion(x,y,z,7,10.0);
CreateExplosion(x,y,z,7,10.0);
CreateExplosion(x,y,z,7,10.0);
SendClientMessageToAll(COLOR_NUCLEAR, "|- Nuclear has Killed! everyone! -|" );
}
}
}
return 1;
}
This Code dont do enything!
Its need do give Message it means that the NUCLEAR HAS KILLED EVERYONE
And its dont give nothing!
Re: NUCLEAR BASE HELP -
Jochemd - 30.01.2012
pawn Код:
if(gTeam[playerid] != TEAM_NUCLEAR)
This checks if the team is NOT TEAM_NUCLEAR and if that is true, it continues.
Re: NUCLEAR BASE HELP -
James Coral - 30.01.2012
Quote:
Originally Posted by Jochemd
pawn Код:
if(gTeam[playerid] != TEAM_NUCLEAR)
This checks if the team is NOT TEAM_NUCLEAR and if that is true, it continues.
|
Dont Work Dude ): TESTED
Respuesta: NUCLEAR BASE HELP -
kirk - 30.01.2012
SendClientMessageToAll(COLOR_NUCLEAR, "|- Nuclear has Killed! everyone! -|" );
You gonna send that the times the if() its true, so if its true for 30 players you gonna send it 30 times, aswell as setplayercameralookat.
Post the OnPlayerCommandText public function here, if im not wrong dcmd needs to be declared there with the ammount of characters the cmd had and something else.
Re: NUCLEAR BASE HELP -
Roperr - 30.01.2012
Bad use of loop. As kirk said, if you're going to make it work, it's gonna spam.
if(IsPlayerConnected(i) && ( i != playerid) && (CanUseNUCLEAR[playerid] == 1337))
^^
One of those does not work
IsPlayerConnected = fine
i != playerid = fine
CanUseNUCLER = try checking this before.
Replace if(gTeam[playerid] != TEAM_NUCLEAR) with if(gTeam[playerid] == TEAM_NUCLEAR)
Re: NUCLEAR BASE HELP -
James Coral - 30.01.2012
Quote:
Originally Posted by Roperr
Bad use of loop. As kirk said, if you're going to make it work, it's gonna spam.
if(IsPlayerConnected(i) && ( i != playerid) && (CanUseNUCLEAR[playerid] == 1337))
^^
One of those does not work
IsPlayerConnected = fine
i != playerid = fine
CanUseNUCLER = try checking this before.
Replace if(gTeam[playerid] != TEAM_NUCLEAR) with if(gTeam[playerid] == TEAM_NUCLEAR)
|
Dont Work!!!
Re: nuclear base help -
James Coral - 31.01.2012
Somebody?