Whats wrong with this command? -
SchurmanCQC - 06.02.2011
The title.
pawn Код:
command(undercover, playerid, params[])
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1)
{
if(IsPlayerInAnyVehicle);
{
SetPVarInt(playerid, "coplight0", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "coplight1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "coplight0"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "coplight1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid,RED,"You need to be inside a car to use this. Preferrably the Elegent");
}
else
{
SendClientMessage(playerid,RED,"You must be in the LSPD to use this.");
}
}
return 1;
}
Re: Whats wrong with this command? -
farris - 06.02.2011
if(IsPlayerInAnyVehicle(playerid))
Re: Whats wrong with this command? -
On_Top_Non_Stop - 06.02.2011
Quote:
Originally Posted by farris
if(IsPlayerInAnyVehicle(playerid))
|
And missing/miss-placed brackets..
pawn Код:
command(undercover, playerid, params[])
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetPVarInt(playerid, "coplight0", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "coplight1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "coplight0"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "coplight1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid,RED,"You need to be inside a car to use this. Preferrably the Elegent");
}
}
else
{
SendClientMessage(playerid,RED,"You must be in the LSPD to use this.");
}
return 1;
}
Re: Whats wrong with this command? -
Scenario - 06.02.2011
pawn Код:
command(undercover, playerid, params[])
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetPVarInt(playerid, "coplight0", CreateObject(18646,0,0,0,0,0,0));
SetPVarInt(playerid, "coplight1", CreateObject(18646,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "coplight0"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "coplight1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid,RED,"You need to be inside a car to use this. Preferrably the Elegent");
}
}
else
{
SendClientMessage(playerid,RED,"You must be in the LSPD to use this.");
}
return 1;
}
Re: Whats wrong with this command? -
Antonio [G-RP] - 06.02.2011
Quote:
Originally Posted by On_Top_Non_Stop
And missing/miss-placed brackets..
pawn Код:
command(undercover, playerid, params[]) { if(Groups[Player[playerid][Group]][CommandTypes] == 1) { if(IsPlayerInAnyVehicle(playerid)); { SetPVarInt(playerid, "coplight0", CreateObject(18646,0,0,0,0,0,0)); SetPVarInt(playerid, "coplight1", CreateObject(18646,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "coplight0"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "coplight1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid,RED,"You need to be inside a car to use this. Preferrably the Elegent"); } } else { SendClientMessage(playerid,RED,"You must be in the LSPD to use this."); } return 1; }
|
Jesus Christ, you're even worse.
Re: Whats wrong with this command? -
On_Top_Non_Stop - 06.02.2011
Quote:
Originally Posted by Antonio [G-RP]
Jesus Christ, you're even worse.
|
How do you mean?
And if I made a mistake, would it not be better to try and help like I was doing rather than posting useless nonsense that's no help to any body?
Re: Whats wrong with this command? -
Antonio [G-RP] - 06.02.2011
I mean, you created something that wouldn't help him at all.
And why would I, when RealCop already provided the correct code for him?
Re: Whats wrong with this command? -
On_Top_Non_Stop - 06.02.2011
Quote:
Originally Posted by Antonio [G-RP]
I mean, you created something that wouldn't help him at all.
And why would I, when RealCop already provided the correct code for him?
|
Are you serious?
RealCop posted AFTER me.
Your obviously trying to start a flame war or something so this is the last time I am posting here.
Re: Whats wrong with this command? -
Antonio [G-RP] - 06.02.2011
Quote:
Originally Posted by On_Top_Non_Stop
And missing/miss-placed brackets..
pawn Код:
if(IsPlayerInAnyVehicle(playerid));
|
You didn't help at all, in fact you put him in a similar position to where he was before. When using 'if' statements, colons aren't needed.
Re: Whats wrong with this command? -
On_Top_Non_Stop - 06.02.2011
Thank you for pointing out MY mistake (at last). I was just a typo as I wrote it on the forums. If you just said I would have edited it and all would be well..