nuclear base help
#1

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!
Reply
#2

pawn Код:
if(gTeam[playerid] != TEAM_NUCLEAR)
This checks if the team is NOT TEAM_NUCLEAR and if that is true, it continues.
Reply
#3

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
Reply
#4

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.
Reply
#5

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)
Reply
#6

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!!!
Reply
#7

Somebody?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)