#1

hi i need help with this if i type /helmet i cant take off the helmet

i dont know how to do it plz help
Reply
#2

Just destroy the object with a command, or when you exit a vehicle
Reply
#3

i cant take it off with this command

if(strcmp(cmd, "/helmet",true) == 0) {
SetPlayerAttachedObject(playerid,3 , 18645, 2, 0.07, 0.017, 0, 88, 75, 0);
return 1;
}

what do i add i want to write /helmet to put it on and /helmet to take it off help!
Reply
#4

Like i said, destroy the object, and then add it to a command
https://sampwiki.blast.hk/wiki/RemovePlayerAttachedObject
Reply
#5

pawn Код:
if( !strcmp( cmd, "/helmet",true ) ) {
    if( GetPVarInt( playerid, "Helmet" ) == 0 ) {
        SetPlayerAttachedObject(playerid,3 , 18645, 2, 0.07, 0.017, 0, 88, 75, 0);
        SetPVarInt( playerid, "Helmet", 1 );
    }
    else {
        RemovePlayerAttachedObject( playerid, 3 );
        SetPVarInt( playerid, "Helmet", 0 );
    }
    return 1;
}
EDIT: I wouldn't mind knowing if it worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)