Help attach object with else -
GrOobY - 06.05.2014
Код HTML:
COMMAND:bandana(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
SetPlayerAttachedObject(playerid, 0, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, COLOR_GREEN, "Repeat command to remove object");
}
else
{
RemovePlayerAttachedObject(0);
}
return 1;
}
Error
C:\Users\Digital\Documents\samp\filterscripts\band an.pwn(139) : error 010: invalid function or declaration
C:\Users\Digital\Documents\samp\filterscripts\band an.pwn(143) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Line 139 its else
143 its return 1;
Re: Help attach object with else -
David (Sabljak) - 06.05.2014
Код:
COMMAND:bandana(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
SetPlayerAttachedObject(playerid, 0, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, COLOR_GREEN, "Repeat command to remove object");
else
{
RemovePlayerAttachedObject(0);
}
return 1;
}
learn that { }
Re: Help attach object with else -
GrOobY - 06.05.2014
still not working
C:\Users\Digital\Documents\samp\filterscripts\band an.pwn(13
: error 029: invalid expression, assumed zero
C:\Users\Digital\Documents\samp\filterscripts\band an.pwn(140) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Line 138: else
Line 140: RemovePlayerAttachedObject(0);
Re: Help attach object with else -
mrtms - 06.05.2014
PHP код:
new Bandana[MAX_PLAYERS];
COMMAND:bandana(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if(Bandana[playerid] == 0)
{
SetPlayerAttachedObject(playerid, 0, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, COLOR_GREEN, "Repeat command to deattach object");
Bandana[playerid] = 1;
}
else
{
RemovePlayerAttachedObject(0);
SendClientMessage(playerid, COLOR_GREEN, "Repeat command to attach object");
Bandana[playerid] = 0;
}
return 1;
}
Re: Help attach object with else -
GrOobY - 06.05.2014
C:\Users\Digital\Documents\samp\filterscripts\band an.pwn(145) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
line 145 its RemovePlayerAttachedObject(0);
Re: Help attach object with else -
gekas - 06.05.2014
PHP код:
RemovePlayerAttachedObject(playerid, 0);
Try this if doesent work tell mee
Re: Help attach object with else -
GrOobY - 06.05.2014
Works gekas thnx now i will try the script