Help! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help! (
/showthread.php?tid=266337)
Help! -
Dan_Barocu - 04.07.2011
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
Re: Help! -
Wesley221 - 04.07.2011
Just destroy the object with a command, or when you exit a vehicle
Re: Help! -
Dan_Barocu - 04.07.2011
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!
Re: Help! -
Wesley221 - 04.07.2011
Like i said, destroy the object, and then add it to a command
https://sampwiki.blast.hk/wiki/RemovePlayerAttachedObject
Re: Help! -
Mean - 04.07.2011
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.