HoldObject
#1

////////
Reply
#2

pawn Код:
if(strcmp(cmd, "/prillid", true) == 0)
    {
        if(PData[playerid][rprillid] != 0) {
            if(xrprillidx[playerid] == 0) {
                prilliobjekt[playerid] = SetPlayerAttachedObject(playerid, 2, PData[playerid][rprillid], 2, 0.09, 0.04, 0, 88, 75, 0);
                xrprillidx[playerid] = 1;
            }
            else if(xrprillidx[playerid] == 1) {
                RemovePlayerAttachedObject(playerid,prilliobjekt[playerid]);
                xrprillidx[playerid] = 0;
            }
        } else {
            Kiri(playerid, VALGE, "Sul ei ole prillid ostetud!");
        }
        return 1;
    }
Reply
#3

@Sascha: No, your syntax is wrong.
pawn Код:
RemovePlayerAttachedObject(playerid,index);
Reply
#4

// Nvm it works.
Reply
#5

Quote:
Originally Posted by Pablo Borsellino
Посмотреть сообщение
@Sascha: No, your syntax is wrong.
pawn Код:
RemovePlayerAttachedObject(playerid,index);
well yea, I wasn't familar with that function hehe..
however the "else" was missing, too... if he is using "if" and later again "if" and checking for a variable that he is changing in the first if statement at the second one, it won't work how it should, neither... :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)