Help attach object with else
#1

Код 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;
Reply
#2

Код:
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 { }
Reply
#3

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

PHP код:
new Bandana[MAX_PLAYERS];

COMMAND:bandana(playeridparams[]) // or CMD:mycommand(playerid, params[])
{
    if(
Bandana[playerid] == 0)
    {
        
SetPlayerAttachedObject(playerid01891220.0785340.041857, -0.001727268.9704581.533374269.223754);
        
SendClientMessage(playeridCOLOR_GREEN"Repeat command to deattach object");
        
Bandana[playerid] = 1;
    }
    else
    {
        
RemovePlayerAttachedObject(0);
        
SendClientMessage(playeridCOLOR_GREEN"Repeat command to attach object");
        
Bandana[playerid] = 0;
    }
    return 
1;

Reply
#5

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

PHP код:
RemovePlayerAttachedObject(playerid0); 
Try this if doesent work tell mee
Reply
#7

Works gekas thnx now i will try the script
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)